title: attr('class') and hasClass() giving conflicting results
body: <p>I'm getting some confusing results in jQuery, with attr('class') and hasClass(). Basically, I am traversing through table rows and figuring out if the next visible table row has a certain class.</p>
  <pre><code>$('table#blocks tr.region').each(function () {
      var next_row = $(this).nextAll('tr:visible');
              
      console.log('This: ' + $(this).attr('class') + ' Next: ' + next_row.attr('class') + ' Next is a region: ' + next_row.hasClass('region'));
                       
   });
  </code></pre>
  <p>When I run this script, the log shows:</p>
  <blockquote>
  <p>This: region region-left Next: region region-right Next is a region: true</p>
  <p>This: region region-right Next: region region-content Next is a region: true</p>
  <p>This: region region-content Next: <strong>draggable even shown_on_home shown_on_infozone</strong> Next is a region: <strong>true</strong></p>
  <p>This: region region-header Next: <strong>region-message region-header-message region-empty</strong> Next is a region: <strong>true</strong></p>
  <p>This: region region-footer Next: <strong>region-message region-footer-message region-empty</strong> Next is a region: <strong>true</strong></p>
  <p>This: region region--1 Next: undefined Next is a region: false</p>
  </blockquote>
  <p>So the message clearly shows that some rows have the class 'region' and some don't, but they all return true for hasClass()!</p>
  <p>Can anyone shed some light on this?</p>
  <p>Thanks :)</p>