title: jQuery: value.attr is not a function
body: <p>I have this snipped in my page:</p>
  
  <pre><code>$('#category_sorting_form_save').click(function(){
      var elements = $("#category_sorting_elements &gt; div");
      $.each(elements, function(key, value) {
          console.info(key," : ",value);
          console.info("cat_id: ",value.attr('cat_id'));
      });
  });
  </code></pre>
  
  <p>And when it is executed, I get:</p>
  
  <pre><code>0 : &lt;div class="dragable" cat_id="6" value="" style="opacity: 1;"&gt;    
  value.attr is not a function
      console.info("cat_id: ",value.attr('cat_id'));
  </code></pre>
  
  <p>What am I doing wrong here? I am trying to get the value of the div.cat_id element.</p>