jquery $.each gives me an object that does not have hasClass method
<p>I'm trying to iterate over a collection of items with the class <code>required</code>. I think I must be using the <code>$.each</code> function incorrectly.</p>

<pre><code>function required(address) {
    //object to hold elements not passing validation tests
    var pass = true;
    $('.required').each(function(index, elem){
        console.log(elem);
        //check if it has the class indicating it is an email
        if (elem.hasClass('re')) {
            var validEmail = validateEmail(address.email);
            if (!validEmail){
                $(this).addClass('nv'); 
            }

        }
      });
  }
</code></pre>

<p>I see that the element in the console is 
<code>&lt;input type=​"text" id=​"name_input" class=​"pr required"&gt;​</code></p>

<p>And then the error
<code>Uncaught TypeError: Object #&lt;HTMLInputElement&gt; has no method 'hasClass'</code></p>

<p>How can that object not have the hasClass method?</p>
