title: jQuery .hasClass() method fails for SVG elements
body: <p>I have a set of SVG elements with the classes <code>node</code> and <code>link</code>. My program should detect whether an element has the <code>node</code> class or the <code>link</code> class upon hovering over any of the SVG elements. However, for some reason, the <code>.hasClass()</code> doesn't seem to work:</p>
  
  <pre><code>$(".node").hover(function(evt){
      console.log($(this).attr("class")); //returns "node"
      console.log($(this).hasClass('node')); //returns false
  }, function(){console.log("Done");});
  </code></pre>
  
  <p>So the element I hovered on has the class <code>node</code>, and jQuery detects that too, as shown by <code>console.log($(this).attr("class"));</code>, but for some reason the actual <code>.hasClass()</code> fails. Why is this? Is it failing because of the SVG?</p>