JQuery get count of rows
<p>Very Quick points. I have seen very similar questions here on SO but they usually use the table ID or assume there is only one table. I have a page with many tables using the same template (no unique ID) and would like to know if when a particular data is loaded, if the rows are empty. I have tried :</p>

<p><a href="https://stackoverflow.com/questions/1149958/jquery-count-number-of-rows-in-a-table">jQuery: count number of rows in a table</a> </p>

<p><a href="https://stackoverflow.com/questions/2931234/jquery-get-the-value-of-first-td-in-table">Jquery- Get the value of first td in table</a> and many others</p>

<pre><code>  //var row = $(this).closest('table tbody:tr:first');
                // var row = $(this).closest('tr').children('td:first').text();
                // var row = $(this).closest('tr').length;
                // var row = $(this).closest('tr').children('td:first').length;
                // var row = $(this).closest('table').find("tbody").children().length;
                // var row = $(this).closest('table').children('tr:last').index() + 1;
                // var row = $(this).closest('table').rowIndex;
                // var row = $("tbody").has("tr");
                // var row = $(this).closest('tbody').has("tr");
                var row = $('#tbody').children('tr:first').length;
</code></pre>

<p>But cannot get the right answer.</p>

<p>Below is the table structure:</p>

<p><a href="https://i.stack.imgur.com/vR2ci.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vR2ci.jpg" alt="enter image description here"></a></p>