How to I get selected rows in an table?
<p>I have a table where each rows has a check box.</p>

<p>This code works for another table:</p>

<pre><code>    jQuery('#my_table_id tr').has(':checkbox:checked').closest('tr').each(function() {
      request_arr[i] = jQuery(this).attr('id');
      i++;
    });
</code></pre>

<p>Now in this case, I have a table object:</p>

<pre><code>    var tbl = $('#my_table') // In my code, this is done dynamically

    // This does not work
    jQuery(tbl + 'tr').has(':checkbox:checked').closest('tr').each(function() {
      request_arr[i] = jQuery(this).attr('id');
      i++;
    });
</code></pre>

<p>How can I get checked rows using a table object like <code>tbl</code>?
I've tried various drilldowns, but I can't get any to work.</p>

<p><strong>Update</strong>  </p>

<p>This is how I've set up my html:</p>

<pre><code>&lt;table id="t1"&gt;&lt;/table&gt;

&lt;div class="bulk_action"&gt;
  &lt;div title="Remove requests" class="trash_iconset_grey_16px removeRequest"&gt;&lt;/div&gt;
  &lt;div title="some other button" class="abc"&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;table id="t2"&gt;&lt;/table&gt;

&lt;div class="bulk_action"&gt;
  &lt;div title="Remove requests" class="trash_iconset_grey_16px removeRequest"&gt;&lt;/div&gt;
  &lt;div title="some other button" class="abc"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Clicking the "button" below table 1, will set <code>tbl = &lt;table id="t1"&gt;</code>.  </p>

<p>@elcanrs solution will also fetch checked rows in table nr 2. I only want checked rows for table nr 1.</p>
