title: Jquery hasClass + If Statement
body: <p>I want the following loadContent function to load the target div only if the link clicked has a certain class.  This is what I've come up with so far:</p>
  
  <pre><code>function loadContent(targetDIV, sourceURL) {
  if ( $(this).hasClass("done") ) {
  $(""+targetDIV+"").load(""+sourceURL+"");
  }
  }
  
  &lt;a href="javascript:loadContent('#nav', 'news.php');" class="done"&gt;News&lt;/a&gt;
  </code></pre>
  
  <p>The function works without the if statement, but I just can't seem to get the hasClass to work with the if - any thoughts?  Thanks!</p>