小编Liv*_*ffs的帖子

jQuery Easing with slideUp Easing Function

我刚从StackExchange上读到了这个问题和答案,但解决方案对我不起作用.

这不起作用:

 $("#top_slide").slideUp(5000, "easeInOutQuart");
Run Code Online (Sandbox Code Playgroud)

但这确实有效:

$("#top_container").animate({height: headerHeight}, 5000, "easeInOutQuart");
Run Code Online (Sandbox Code Playgroud)

我正在使用最新的jQuery-1.10.2.js.

有什么想法吗?

//

我添加了这样的缓动插件,它在jsfiddle中工作:

<script src="js/jquery-1.10.2.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/jquery.easing.compatibility.js"></script>
<script src="js/jquery.easing.min.js"></script>
Run Code Online (Sandbox Code Playgroud)

脚本代码是这样的:

 $("#top_slide").slideUp({ duration: 5000, easing: "easeInOutQuart" });
Run Code Online (Sandbox Code Playgroud)

我仍然得到这个错误:

Uncaught TypeError: Object #<Object> has no method 'easeInOutQuart'
rr.run jquery.js:9216
l jquery.js:8914
x.fx.timer jquery.js:9511
er jquery.js:8981
a jquery.js:9305
x.extend.dequeue jquery.js:3948
(anonymous function) jquery.js:3991
x.extend.each jquery.js:657
x.fn.x.each jquery.js:266
x.fn.extend.queue jquery.js:3984
x.fn.extend.animate jquery.js:9316
x.fn.(anonymous function) jquery.js:9442
(anonymous function) playingWithjQuery.php:38
c jquery.js:3048
p.fireWith jquery.js:3160
x.extend.ready jquery.js:433
q 
Run Code Online (Sandbox Code Playgroud)

提前致谢!

//

我把它改成了一个div,这是我的html,这里是 …

jquery slideup jquery-easing

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

jquery ×1

jquery-easing ×1

slideup ×1