How to check element triggered by onBlur has certain class with jQuery
<p>HTML</p>

<pre><code>   &lt;input type="text" id="trainingFee" name ="training Fee" class="number error" value="" onblur="callMe()"&gt;
</code></pre>

<p>jQuery</p>

<pre><code>    function callMe(){
       if($this.id).hasClass('error')){
        alert("has error class");       
 }
</code></pre>

<p>}</p>

<p>but this is not working. What am I doing wrong?</p>
