Delete current row in a <table> with jQuery
<p>I have a table that lists a bunch of customers. The last cell is an ajax delete button.</p>

<p>I want the row containing the deleted customer to be deleted through jQuery.</p>

<pre><code>&lt;table&gt;
&lt;tr&gt;&lt;td&gt;Customer info 1&lt;/td&gt;&lt;td&gt;&lt;a href="javascript:deleteCustomer(1);"&gt;Delete&lt;/a&gt;&lt;/td&gt;
&lt;tr&gt;&lt;td&gt;Customer info 2&lt;/td&gt;&lt;td&gt;&lt;a href="javascript:deleteCustomer(2);"&gt;Delete&lt;/a&gt;&lt;/td&gt;
</code></pre>

<h2>    </h2>

<pre><code>function deleteCustomer(customerId)
{
$.post("somepage.php", {cid:customerId}, function(data){
//...delete the row that called the function...
}
</code></pre>
