Some sites have tables which appends rows when you scroll the browser so that the bottom of the table is visible.
Guess it’s something like this:
- jQuery detects that the end of the table is visible in the browser
$.getJSONis used to fetch the next rows from the server- the rows are appended.
Questions:
- How do I detect that the last row is visible in the browser?
- Is there a better way than $(‘#tableId tbody tr’).length to get the current number of rows?
(1) Detect whether the last row is visible:
(2) That’s the correct way to determine the number of rows.