Zebra striping after jQuery remove()
<p>I use jQuery to zebra-stripe my table because it works for ie8.</p>

<p><code>$('table.data tr:nth-child(odd)').css('background-color', '#ececec');</code></p>

<p>Problem is, I have a button that allows you to remove a row.</p>

<p><code>$(this).parents('tr').remove();</code></p>

<p>Which throws off the zebra striping. So I've tried:</p>

<pre><code>$(this).parents('tr').remove();
$('table.data tr:nth-child(odd)').css('background-color', '#ececec');
$('table.data tr:nth-child(even)').css('background-color', '#ffffff');
</code></pre>

<p>And</p>

<pre><code>$(this).parents('tr').remove();
$('table.data tr').css('background-color', '#ffffff');
$('table.data tr:nth-child(odd)').css('background-color', '#ececec');
</code></pre>

<p>Neither of which work. <code>.remove()</code> doesn't have a callback function or I'd put the zebra striping in it. Any ideas?</p>

<p>Edit - the code above works, but there was a css conflict. (See answer below). The conflict however doesn't set the background color. So, I would still like to know why the rule causes a conflict.</p>
