How do I remove a <tr> with jQuery?

Posted by George Edison on Stack Overflow See other posts from Stack Overflow or by George Edison
Published on 2010-03-13T05:23:06Z Indexed on 2010/03/13 5:25 UTC
Read the original article Hit count: 199

Filed under:
|
|
|

Okay, I am really stuck here.

I have a table of tr's that have id's: #tr_xx where xx is a number.

item is a number.

The if(... part makes sure that what follows is only executed once at the end of all the animations.

$('#tr_' + item + '>td').fadeOut('slow', function() {                
    if($('#tr_' + item + '>td:animated').length === 0)
    {
        $(this).parent().remove();
        // This function recolors the rows
        // -not really related to this
        Recolor();
        }
    });

The problem is that the tr does not get deleted. It just gets hidden.

How can I delete the <tr> and not just hide it?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about table