title: unable to get the value of href from a tag using jquery
body: <p>I am trying fetch the <code>href</code> value in an <code>&lt;a&gt;</code> with a class of "title". The result here should be the path <code>"../../images/packages2/agra1.jpg"</code> but somehow it's not working. Here is my HTML:</p>
  
  <pre><code>  &lt;div id="packgeImages"&gt;
          &lt;ul&gt;
  &lt;li&gt;&lt;a class="title" href="../../images/packages2/agra1.jpg" rel="shadowbox" title=""&gt;&lt;img src="../../images/packages2/agra1thumb.jpg" alt="thumb1" /&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>and here is my JavaScript:</p>
  
  <pre><code>  var $title = $('.title').attr("href");
  </code></pre>
  
  <p>Then I am using alert to check the results.. but somehow it seems blank.</p>
  
  <p>Can anybody tell me what I'm doing wrong?</p>