Get Row ID when click on link in cell
<p>Lets say I want to get the ID of a row when I click on a span in a cell as below</p>

<pre><code>&lt;tr id="theRowID"&gt;
    &lt;td&gt;&lt;span class="getRowID"&gt;get this rows ID&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>Would this be accurate?</p>

<pre><code>$(".getRowID").click(function(){
    $(this).closest('tr').attr("id");
});
</code></pre>
