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>