title: jquery e.target.hasClass not working
body: <p>I dynamically create a new <code>div</code> (with a "textbox" class and ID), and some other elements inside of it, and later on in my code I bind that <code>div</code> to the click event, and display the element clicked, like so:</p>
  
  <pre><code>$('#textbox_'+i).bind('click', function(event){
      alert(event.target.className);
  }
  </code></pre>
  
  <p>This is fine, and it'll give me <code>textbox</code> as one of the classes displayed.
  But <code>event.target.hasClass()</code> doesn't seem to work. So, when I do the following, nothing happens:</p>
  
  <pre><code>$('#textbox_'+i).bind('click', function(event){
      if(event.target.hasClass('textbox')) { alert('got it!'); }
  }
  </code></pre>
  
  <p>I tried it a few different ways and it appears to me that <code>event.target.hasClass()</code> just doesn't work. Is there another way to deal with events or am I doing something wrong?</p>