selecting closest anchor element using jquery
<p>I have a table with one link as follows</p>

<pre><code> &lt;td&gt;
      &lt;a href="#" class="topiclink"&gt;@item.Topic&lt;/a&gt;
   &lt;/td&gt;
</code></pre>

<p>I want to select data of @item.topic.
I tried using</p>

<pre><code>  $('.topiclink').click(function (e) {
  var val = $(this).closest('a');
        alert(val)
    });
</code></pre>

<p>and many others but nothing seems working in this case.Thank for the help.</p>
