Selecting all of the checkboxes in jQuery
<p>I have code which displays a person's info in a table (fields:name, surname, address, etc.) and one of the inputs is a checkbox. The code is as follows:</p>

<pre><code>$("#table").append('&lt;tr class="trow'+j+'"&gt;'+
                      '&lt;td class="ids" id="z'+i+'"&gt;'+totrecs+'&lt;/td&gt;'+
              '&lt;td&gt;'+member[i].jdate+'&lt;/td&gt;'+
              '&lt;td class="users" 

              '&lt;td id="contact'+i+'"&gt;'+member[i].fname+' '+member[i].lname+'&lt;/td&gt;'+
              '&lt;td id="myaddress'+i+'"&gt;'+member[i].address1+' '+member[i].town+'&lt;/td&gt;'+

              '&lt;td&gt;&lt;input type="checkbox" name="whome" id="showMe'+i+'"'+
                                             'class="boxes" onclick="getMe('+i+')" /&gt; &lt;/td&gt;&lt;/tr&gt;');  
      totrecs++;
      j++;
     }
</code></pre>

<p>button - <code>&lt;input type="button" id="selectall" title="Select All" value="Select All" /&gt;</code></p>

<p>What I am trying to do is create a function sot that when a certain button is clicked, all of the checkboxes will be selected/checked.</p>

<p>I would appreciate any help. Thank You.</p>
