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 to count tr, which does not have a style property OR with the style = "" property.
I use the code below, but it gives me a score of 8 instead of 5.
var docs = jQuery("#tbl").find('tbody').find('tr:visible'); alert(docs.length);
source share