title: jQuery - Get Title Attribute from IMG tag
body: <p>I have a list of IMG tags with different TITLE attributes as provided below.</p>
  
  <pre><code>&lt;img src="avatar1.png" title="Admin" height="90px" width="90px" /&gt;  
  &lt;img src="avatar2.png" title="Purus" height="90px" width="90px" /&gt;  
  &lt;img src="avatar3.png" title="Test" height="90px" width="90px" /&gt;  
  </code></pre>
  
  <p>I am trying to get the TITLE attribute of the IMG tag when the user click on the image. Below is the jQuery I have used.</p>
  
  <pre><code>$('img').click(function(){  
      alert($(this).attr('title'));  
  });  
  </code></pre>
  
  <p>With this code I get the alert as "Undefined". I tried to search already and any solution did not help me. Where I am going wrong here? </p>
  
  <p>PS: This is my first question over here. So advice if I am doing anything wrong in this post.</p>