Hi all I need to find the length of all the li elements which has display block only. How can this be possible using jQuery. I have a category menu block which has more link at the bottom which when clicked will displays the all categories.The Bottom link now turn to Less which when clicked displays less items. Here is the code.
var list = $('.menu-categories-list ul li:gt(3)');
list.hide();
$('#ClickMore').click(function() {
list.slideToggle(400);
if( $(this).parent().prev().children().length < 1 ) {
$(this).html('Less...');
}
else {
$(this).html('More...');
}
return false;
});
YOu can have a look at the link. The categories block on the left side