title: jQuery: How to get a set of elements?
body: <p>I have a simle <code>html</code> <code>div</code> with a variable number of input checkboxes and i whould like to chek which chekbox is cheked and which isn't</p>
  
  <p>HTML code:</p>
  
  <pre><code>&lt;div&gt;
      &lt;input type="checkbox" val="1"/&gt;Check One&lt;br/&gt;
      &lt;input type="checkbox" val="2" checked="checked"/&gt;Check Two&lt;br/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Javascript code:</p>
  
  <pre><code>var $kids = $("div").children("input");
  
  for (var i = 0; i &lt; $kids.length; i ++) {
      // if i alert($kids[i]); i get [object HTMLInputElement] how can i work with it?
      alert ($kids[i].val()); // doesn't work
  }
  </code></pre>
  
  <p>In <a href="http://docs.jquery.com/Traversing/children" rel="nofollow noreferrer">jQuery site</a> i read <code>children()</code> method can "Get a set of elements containing all of the unique immediate children of each of the matched set of elements." but what is a "set of elements"and how can I work with it?</p>