Another option is to wrap each of your TDs within the row with a DIV. Then you can do something like $("#myRow div.animateMe").slideUp(); Then the row has no vertical height because it's content is now invisible.

Just a thought....

Shawn

Karl Swedberg wrote:
Chris,

The .fadeIn() and .fadeOut() might be an acceptable compromise.

By the way, IE doesn't understand display: table-row, so if I recall correctly the display: block actually works there.

--Karl

____________
Karl Swedberg
www.englishrules.com <http://www.englishrules.com>
www.learningjquery.com <http://www.learningjquery.com>




On Nov 13, 2008, at 9:11 PM, c.barr wrote:


Hmm, well that's too bad.  I actually tried to do a custom .animate()
with a height from 0 to the corrcet height, but that's the same issue
- it sets it to display:block.

The closest I've come is to do my animation, and then do a callback
when it finishes of .css("display","table-row") - which works, but it
only looks correct once it's finished animating - and the animation
looks all messed up - so that defeats the purpose.

Oh well, thanks for the info anyway!

On Nov 13, 8:06 pm, ricardobeat <[EMAIL PROTECTED]> wrote:
It's impossible to animate a table row's height to/from 0. Try setting
the tr height less than the text height, it doesn't work. Only block
elements can use this effect :)

On Nov 13, 9:06 pm, "c.barr" <[EMAIL PROTECTED]> wrote:

I'm creating an admin section for a site where I need to dynamically
add a new row to a table - which I know how to do just fine, but the
problem is that when you do an animation like .slideDown() jQuery sets
it to display:block; and for a table row this is incorrect, as it
should be display:table-row;

The result is it basically screws up the table formatting. Here's a
demo:http://jsbin.com/alemi

Sure I can just do a plain .show() with no animation to show it, but
then why both even using jQuery.  Is there a way to fix this behavior?

Reply via email to