title: Jquery get values of all checked rows in table gridview
body: <p>I have a table like below</p>
  
  <pre><code>&lt;table id="mytable"&gt;
  &lt;tr&gt;&lt;th&gt;checked&lt;/th&gt;&lt;th&gt;id&lt;/th&gt;&lt;th&gt;text&lt;/th&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&lt;input id="cb1" type="checkbox" name="checker1"/&gt;&lt;/td&gt;&lt;td&gt;123&lt;/td&gt;&lt;td&gt;abc&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&lt;input id="cb1" type="checkbox" name="checker1"/&gt;&lt;/td&gt;&lt;td&gt;456&lt;/td&gt;&lt;td&gt;def&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;&lt;input id="cb1" type="checkbox" name="checker1"/&gt;&lt;/td&gt;&lt;td&gt;789&lt;/td&gt;&lt;td&gt;ghi&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I want to retrieve (using jquery) a javascript array of all checked ID's in the table.</p>
  
  <p>So far I have the following jquery code which on the click of the jqcc button brings me an alert box for each of the checked items, so instead of alert, i need to retrieve the value of the second td and add it to an array,</p>
  
  <pre><code>$(document).ready(function() {
      var tableControl= document.getElementById('mytable');
      $('#jqcc').click(function() {
          $('input:checkbox:checked', tableControl).each(function() {
              alert('checked');
          });
      });
  });
  </code></pre>