title: hasClass doesn't work in my js code?
body: <p>I want to use <code>hasClass</code> in the following code, but that doesn't work for me, please see my demo in jsfiddle and tell me, what do I do wrong?</p>
  
  <pre><code>&lt;span&gt;
      &lt;input type="text" name="relation" class="IdRelation"&gt;
  &lt;/span&gt;
  ​
  
  if ($('span').hasClass('IdRelation')) {
    alert("ok");
  }​
  </code></pre>
  
  <p><a href="http://jsfiddle.net/6Bwkv/" rel="nofollow">DEMO</a></p>