title: Find length of a visible elements using jQuery
body: <p>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.</p>
  
  <pre><code>var list = $('.menu-categories-list ul li:gt(3)');
          list.hide();
          $('#ClickMore').click(function() {
              list.slideToggle(400);
              if( $(this).parent().prev().children().length &lt; 1 ) {
                  $(this).html('Less...');
              }
              else {
                  $(this).html('More...');
              }
              return false;
          });
  </code></pre>
  
  <p>YOu can have a look at the <a href="http://www.aussieshoppingbuyinggroup.com.au/home.php" rel="nofollow">link</a>. The categories block on the left side</p>