124697
124697

Reputation: 21893

Jquery animate not working. I need to add a row to table with animation

I have a function that adds a row to a table the row id="dummy" I need it to animate this. I need the other rows to slide down.

I have to the following code but it doesnt animate just adds the row.

var removeImage = '<td><img src="images/b_redcross.gif" alt="" hspace=0 border="0" align="absMiddle" style="cursor:pointer;width:1.2em;width:1.2em; padding-left:5px; padding-right:5px;" ></td>';
        var html = '<tr><td class="blueFont_inset">test</td><td class="blueFont_inset">test</td>'+removeStaffImage+"</tr></td>";
        $(html).hide().insertAfter($("#dummy")).slideDown('slow'); 

Upvotes: 1

Views: 1184

Answers (1)

tilleryj
tilleryj

Reputation: 14379

This is addressed in the following question:

How to Use slideDown (or show) function on a table row?

Basically you need to wrap the content of the td in a div and animate that.

Upvotes: 1

Related Questions