I'm having trouble with .slideup()
and .slideDown()
have a look at the following JSFiddle: http://jsfiddle.net/7se2r/4/
Although the row is appearing and disappearing, I'm not seeing the animation of sliding up or down. any clue as to what I'm doing wrong?
With "tbody" you can use .show("slow") and .hide("slow"), but you can't do the sliding animation.
Sliding will work if you try it on a "div" for example.
Also, check you don't have CSS transitions set on your element, or globally to all elements. This will screw with your animations:
* {transition: all 0.1s ease;}
Can be done if you create a div
layer inside your td
s and animate that instead. It's not hard to programmatically add div
s when creating your table.
Tbody can't be animated. Try to limit the height of Tbody and you'll see that it doesn't change the height.
Setting the dimensions of a part of a table is only used as the minimum dimension, so the section of the table is immediately visible at full size, and the animation of the height has no effect.
来源:https://stackoverflow.com/questions/6917248/jquery-slideup-slidedown-functions-not-animating