JQuery: How to calculate the number of rows to show within a container
===

kinda hard to explain, but let me try:<br>
I'd like to put a table inside a container <div></div>. this container has a fixed height, say 500px, and the table is rather long, say 2100 and each row's height can be different. 

When the table is created, all the rows are invisible, now I want to do a calculation based on container's height to find out how many rows should appear inside the container. it could be first 15 rows, or first 17 rows (because some row's height is bigger).

After I do that, I let those rows stay there for some time, and hide them again, and do another calculation to fetch next page, and so on... Now the hard part it how do I do the calculation using jquery?