Jquery tr id selection
<p>We are having 2 problem with jquery. Please have a look at the following...</p>

<p>We are using following table:</p>

<pre><code>&lt;tr id="row-5"&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;td&gt;&lt;a class="delete" href="#"&gt;Delete&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>And we are using following code:</p>

<pre><code>$(function () {
    $('.delete').click(function () {
        var id = $(this).parents("tr").attr("id");
        var info = 'id=' + id;
        $.ajax({
            type: "POST",
            url: "delete.php",
            data: info,
            success: function () {}
        });
        return false;
    });
});
</code></pre>

<p>So our questions are...</p>

<ol>
<li>How do we get the correct value of id(5) instead of row-5?</li>
<li>Should we use each function on jquery code? If yes, how do we do that?</li>
</ol>

<p>Thanks for your support.</p>
