jQuery get all checked variables from checkboxes
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/8384291/get-a-list-of-all-checked-values">Get a list of all checked values</a>  </p>
</blockquote>



<p>I have a form with a series of checkboxes all, none or various of which can be checked.</p>

<pre><code> &lt;p&gt;&lt;label for="available_lengths"&gt;Rail Length:&lt;/label&gt;&lt;/p&gt;
 &lt;p&gt;
  &lt;ul&gt;    
   &lt;li&gt;&lt;label for="id_available_lengths_0"&gt;&lt;input name="available_lengths" value="132" id="id_available_lengths_0" type="checkbox" class="can_update_lengths" /&gt; 132&lt;/label&gt;&lt;/li&gt;
   &lt;li&gt;&lt;label for="id_available_lengths_1"&gt;&lt;input name="available_lengths" value="168" id="id_available_lengths_1" type="checkbox" class="can_update_lengths" /&gt; 168&lt;/label&gt;&lt;/li&gt;
   &lt;li&gt;&lt;label for="id_available_lengths_2"&gt;&lt;input name="available_lengths" value="208" id="id_available_lengths_2" type="checkbox" class="can_update_lengths" /&gt; 208&lt;/label&gt;&lt;/li&gt;
   &lt;li&gt;&lt;label for="id_available_lengths_3"&gt;&lt;input name="available_lengths" value="240" id="id_available_lengths_3" type="checkbox" class="can_update_lengths" /&gt; 240&lt;/label&gt;&lt;/li&gt;
  &lt;/ul&gt;
 &lt;/p&gt;
</code></pre>

<p>How do I loop through these and assign a variable the <code>.val()</code> of each?</p>
