Finding HTML table row by class name using jquery
<p>I am using the following code to keep the serial number to stay with the sequence after I remove any HTML table's row.  </p>

<pre><code> $("#trid_"+a_href).remove();

 $("tr").each(function (index) {
     if(index != 0) { 
    $(this).find("td:first").html(index + ""); 
    }
});
</code></pre>

<p>The code is working okay but the problem is it is displaying serial numbers for all the rows in the table. 
But I want to display only in the rows where <code>&lt;tr class="products"&gt;</code>    </p>

<p>My guess is, to solve this problem I have to find the <code>class="products"</code> in tr, so I have tried the following code, but this time the code didn't work at all.</p>

<pre><code>$("#trid_"+a_href).remove();

 $(".products tr").each(function (index) {
     if(index != 0) { 
    $(this).find("td:first").html(index + ""); 
    }
});
</code></pre>

<p>Could you please help me to solve this problem.
Thanks</p>

<h2>Edit</h2>

<p>My entire Code is too large. So I have uploaded the script <a href="https://docs.google.com/open?id=0ByuynjwYX5xAd3BfMmpKY0dXZk0" rel="nofollow">here</a> </p>

<p>Thanks :)</p>
