jquery Learning-sub-selectors and visibility selectors

Source: Internet
Author: User

<! DOCTYPE html>"UTF-8"> <title> Sub-selector and visibility selector </title> <script src="Js/jquery.js"></script> <script type="Text/javascript">$ (function () {//The Li that appears in the first position of its parent element$("Li:first-child"). CSS ("Border","2px solid Red")                 //The Li that appears at the last position of its parent element$("Li:last-child"). CSS ("Border","2px Solid Orange")                   //Li, who appears in the third position of its parent element, learned before 1: EQ (n) starts at 0,$("Li:nth-child (3)"). CSS ("Border","2px solid Blue")                   //get all the elements that can be displayed$(": Visible"). CSS ("Border","2px solid Blue")                  })        //</script> 1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <ul> <li>7</li> <li>8</li> </ul> </ul> </div> </body>

jquery Learning-sub-selectors and visibility selectors

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.