I am kind of new to html, css, jquery and javascript
I am trying to see how many rows have been returned based on the search .
below is the code in the javascrip that I am using .
key notes
Table name : searchResultsTable
var numberOfrows = $("#searchResultsTable tr").length;
Problem
The table is actually returning one row, but when I try to print the numberofrows
it is printing as 2 . not sure why.
Depending upon the number of reports, I have to call different function.
I checked the code to see if there is any hidden row but nothing.
Can anyone clarify this for me?
With the help of SvenBieder .
table header in the first row will also be counted when you try to count the number of rows in a table.