Hide nested html elements except the first two (jQuery)? -


i have structure this:

<ol class="feeds">   <li class="feed"></li>   <strong>     <li class="feed"></li>     <strong>       <li class="feed"></li>       <strong>         <!-- , on -->       </strong>     </strong>   </strong> </ol> 

how can hide .feed elements except first , second?

try :-

$(".feed:gt(1)").hide(); //since javascript arrays use 0-based indexing have use '1' in index. 

read more :gt() here.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -