How to select visible - on screen table rows in jQuery
<p>OK, I am stumped. I have an HTML table that is within a fixed height, scrollable div and I need to select (using jQuery) all table rows that are visible. That is all rows that are visible on screen. This will depend on where the user is currently scrolled to within the div. So, here is the HTML:</p>

<pre><code>&lt;div style="height:300px;overflow:auto"&gt;
    &lt;table id="mytable"&gt;
        &lt;tr&gt;&lt;td&gt;Row 1&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;Row 2&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;Row 3&lt;/td&gt;&lt;/tr&gt;
        &lt;!-- 500 or so more rows here --&gt;
    &lt;/table&gt;
&lt;/div&gt;
</code></pre>

<p>Using a simple jQuery selector like below don't work because this selects all rows in the table because they are technically visible according to jQuery. They are just not actually visible because you have to scroll to see them.</p>

<pre><code>$('#mytable').find('tr').filter(':visible');
</code></pre>

<p>Instead, I need to see if anyone knows how to only select the rows that are visible within the scrollable div. That is only the rows that the user can actually see at any given point in time. If they scroll down and the selector is run again, it should return a different set of rows, those that are actually visible.</p>

<p>Hope I explained my question correctly. Let me know if I need to elaborate.</p>
