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
Post a Comment