jquery slideUp/slideDown functions not animating

不打扰是莪最后的温柔 提交于 2019-12-29 06:44:11

问题


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?


回答1:


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.




回答2:


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;}



回答3:


Can be done if you create a div layer inside your tds and animate that instead. It's not hard to programmatically add divs when creating your table.

Demo: http://jsfiddle.net/jpillora/wU7RV/




回答4:


Tbody can't be animated. Try to limit the height of Tbody and you'll see that it doesn't change the height.




回答5:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!