I have a tbody, which includes 5 rows(for example), when I tried to count number of rows using the following code I received an error:
var count = $(".grid-row").length
undefined
count
0
Then, I tried ready()
and received the following:
$(".grid-row").ready(function() { console.log( "ready!" );});
// ready!
init [prevObject: init(1), context: document, selector: ".grid-row"]
Only When I clicked on 2-5 row in the element's tab in Chrome, I could access all 5 rows:
$(".grid-row").ready(function() { console.log( "ready!" );});
// VM1565:1 ready!
// init(5) [tr.grid-row.even, tr.grid-row.odd, tr.grid-row.even, tr.grid-row.odd, tr.grid-row.even, prevObject: init(1), context: document, selector: ".grid-row"]
What I should do in this case in order to count all rows? Thanks.