One sentence: implement the jquery navigation bar and implement the jquery navigation bar

Source: Internet
Author: User

One sentence: implement the jquery navigation bar and implement the jquery navigation bar

/* Mine

Easy to learn.

*/
. Current {
Color: red;
Font-size: large;
}

$ (Function (){

// Display/hide the Tag Element Under css and. lev1.
$ (". Lev1> a"). click (function (){
$ (This ). addClass ("current "). next (). show (). parent (). siblings (). children (""). removeClass ("current "). next (). hide ();
Return false;
})

});

 

<Div>
<Ul>
<Li class = "lev1">
<A href = "#"> shirt </a>
<Ul class = "lev2">
<Li> <a href = "#"> Galanz </a> </li>
<Li> <a href = "#"> alicloud </a> </li>
<Li> <a href = "#"> senma </a> </li>
</Ul>
</Li> <br/>
<Li class = "lev1">
<A href = "#"> sweater </a>
<Ul class = "lev2">
<Li> <a href = "#"> sweater 1 </a> </li>
<Li> <a href = "#"> sweater 2 </a> </li>
<Li> <a href = "#"> sweater 3 </a> </li>
</Ul>
</Li>
</Ul>
</Div>

 

<! -- The following code is used by the hacker... -->

// In the tbody of the table with the id of table, if the checkbox of each row is not disabled, the background of the table is changed to red;

$ ("# Table> tbody> tr: has (td: has (: checkbox: enabled)" ).css ("background", "red ");

<Tbody>
<Tr>
<Td> <input type = "checkbox" disabled = "disabled"> x1 </td>
<Td> aaaaa </td>
</Tr>
<Tr>
<Td> <input type = "checkbox"> x2 </td>
<Td> bbbbb </td>
</Tr>

</Tbody>

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.