Here is my html
<table id="tbl1">
<tbody >
<tr class="hide_grid_header"></tr>
<tr style="display: none;"></tr>
<tr style="display: none;"></tr>
<tr ></tr>
<tr style=""></tr>
<tr ></tr>
<tr style=""></tr>
<tr ></tr>
<tr style="display: none;"></tr>
</tbody>
</table>
From this, I want count of tr which dont have style property OR with style=" " property.
i'm using below code, but its giving me count as 8 instead of 5.
var docs = jQuery("#tbl").find('tbody').find('tr:visible');
alert(docs.length);
$('tr').filter(function(){
return !$(this).attr('style');
}).length;
var len = $('tr').filter(function(){
return !$(this).attr('style');
}).length;
http://jsfiddle.net/6pHt6/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With