I use show()
and hide()
to show and hide rows in a table.
How could I count the number of non-hidden rows (more accurately, rows with
Try this:
$('tr:not([style*="display: none"])').length
Example http://jsfiddle.net/infernalbadger/7LvD5/
Filter your rows based on their actual CSS property:
$('tr').filter(function() {
return $(this).css('display') !== 'none';
}).length;
jquery selector to count the number of visible table rows?
Change !== to ===