title: jQuery .each is giving different results on different browsers but no errors. It counts the elements wrong, but why?
body: <p>I need to add the one attribute of all of a certain element to an array:</p>
  
  <p>Here is the html:</p>
  
  <pre><code>&lt;a class="umb" name="/wordpress/images/custom-slideshow/image1.jpg"&gt;  
  &lt;a class="umb" name="/wordpress/images/custom-slideshow/image2.jpg"&gt;  
  &lt;a class="umb" name="/wordpress/images/custom-slideshow/image3.jpg"&gt;
  </code></pre>
  
  <p>Here is the jQuery</p>
  
  <pre><code>var theImages = new Array();
  
  $('.umb').each(function(){
  
      theImages.push($(this).attr('name'));
  
  });
  
  alert(theImages.length);
  </code></pre>
  
  <p>this alerts different numbers in different browsers<br>
  in Firefox "15"<br>
  in IE8 "3"<br>
  in Chrome "6"<br>
  in Opera "3"
  in Safari "12"</p>
  
  <p>The right answer is of course "3". Can't figure out why this is happening.</p>