title: jQuery loop without each and callback function
body: <p>I wish to loop throw jQuery collection without <code>each</code> and callback call.</p>
  
  <p>I have following code</p>
  
  <pre><code>var found1 = false;
  $('#Root div.ListItem').each(function( index, d1 ) { 
      if (group == d1.text()){ found1 = true; }
  } );
  
  if(found1){
      return;
  }
  </code></pre>
  
  <p>Once <code>found1</code> is set true Next time it is always true. I would like to know how to loop without <code>each</code> and callback like</p>
  
  <pre><code>for(var id in $('#Root div.ListItem')) { ... }
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I am not wondering how to break loop.
  I do not wish to pass callback in <code>each</code></p>
  
  <p>If I pass jQuery object in loop then I get to many keys.</p>
  
  <p><a href="http://jsfiddle.net/LwTGU/" rel="nofollow">http://jsfiddle.net/LwTGU/</a></p>
  
  <p>In that example there might be 1 key for one child element.</p>