title: jQuery Each() function not working
body: <p>I'm trying to add a class to each div.banner inside of my #destaques, but isn't working. What's happening?</p>
  
  <p>JS: </p>
  
  <pre><code>$(document).ready(function() {
    bannerRotator("#destaques");
  });
  
  
  
  function bannerRotator(element) {
  
    // Conta quantos banners existem:
  
    i = 0;
  
    $(element).find(".banner").each(function() {
      i++;
      $(this).addClass("test");
    });
  
    alert(i);
  
    //
  
  }
  </code></pre>
  
  <p>HTML: </p>
  
  <pre><code>&lt;div id="destaques"&gt;
  &lt;div class="banner"&gt;&lt;img src="images/001.jpg"/&gt;&lt;/div&gt;
  &lt;div class="banner"&gt;&lt;img src="images/002.jpg"/&gt;&lt;/div&gt;
  &lt;div class="banner"&gt;&lt;img src="images/003.jpg"/&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>