Hide all LI from a separate UL other than the first

Posted by liebgott on Stack Overflow See other posts from Stack Overflow or by liebgott
Published on 2010-06-14T13:30:50Z Indexed on 2010/06/14 13:32 UTC
Read the original article Hit count: 227

Filed under:
|

Hello

I want hide every LI from a UL other than the first, but the result is that it hides all except the very first LI of all UL's. (I want "show" the first LI of every UL).

How can i do that???

 <ul>
    <li>first</li>
    <li>second</li>
 </ul>

 <ul>
    <li>first</li>
    <li>second</li>
 </ul>

When i do this only identified the first item of all UL

    $('.smallYears ul li:not(:first)').hide();          

Thank you very much

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about selectors