title: Loop through JQuery object
body: <p>I'm relatively new with JQuery. Let's say I have a divs structure like this:</p>
  
  <pre><code>&lt;div class='quater'&gt;
    &lt;div id='a' class='target'&gt;&lt;/div&gt;
    &lt;div id='b' class='target'&gt;&lt;/div&gt;
    &lt;div id='c' class='no_target'&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and i would like to ad an onClick function that retrieve class "target" id's.</p>
  
  <p>I tried with:</p>
  
  <pre><code>$('.quater').on('click', function(){
      var $value = $(this).children('.target');
      $value.each(function(){
          alert(this.attr('id'));
     });
  });
  </code></pre>
  
  <p>but it returns: <strong>undefined is not a function</strong></p>
  
  <p>What is the right way to iterate through these elements to retrieve their ids?</p>