How to get the clicked link's href with jquery?
<p>Does anyone know how can I get the clicked link's href with jquery? I have the link as following:</p>

<pre><code>    &lt;a  href="ID=1" class="testClick"&gt;Test1.&lt;/a&gt;
    &lt;br /&gt;
    &lt;a  href="ID=2" class="testClick"&gt;Test2.&lt;/a&gt;
    &lt;br /&gt;
    &lt;a  href="ID=3" class="testClick"&gt;Test3.&lt;/a&gt;
</code></pre>

<p>I wrote a code as following to get the href value from the link I clicked on. But somehow this is always return me the 1st link's href (ID=1) even though I clicked on Test2 or Test3. Does anyone know what is it going on here? and how can I solve this issue?</p>

<pre><code>    $(".testClick").click(function () {
        var value = $(".testClick").attr("href");
        alert(value );
    });
</code></pre>
