我想改变一个元素的高度使用一个jQuery动画两次,但我不能。怎么做?我想使用一个jQuery动画更改元素的高度两次,但我不能。怎么做?
我使用的代码:
$("#animate").click(function() {
$("#content")
.animate({"height": "200px"},{"queue": true, "duration": 500})
.animate({"width": "250px"}, {"queue": true, "duration": 500});
.animate({"height": "100px"},{"queue": true, "duration": 500})
});
,并没有什么happenning .. 但如果我删除了高度的动画中的任何一个,它工作正常。 在此先感谢..
可以看看一t –
Darshan
2013-04-10 06:32:18
试试这个:$(“#content”) .animate({“height”:“200px”},{ ({“width”:“250px”},{“queue”:true,“duration”:500}) .animate({“height”:true,“duration”:500}) .animate “100px”},{“queue”:true,“duration”:500}) }); – Amyth 2013-04-10 06:33:12
在使用';'关闭宽动画语句之后jQuery不知道应该应用第三个动画语句的元素。要么删除';'或者为第三个动画语句指定元素。 – Amyth 2013-04-10 06:34:55