admin管理员组文章数量:1357716
I've got an Unordered List setup, I would like to apply the simple elastic property used in jQuery. When running the script, I keep getting an JavaScript Error :
Error: D.easing[this.options.easing || (D.easing.swing ? "swing" : "linear")] is not a function Source File: jquery-pack.js?1296815924
The Java is working but it is not creating the desired effect. My jQuery Code is :
<script type="text/javascript">
$(document).ready(function(){
//When mouse rolls over
$("li").mouseover(function(){
$(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: "easeOutElastic"})
});
$("li").mouseout(function(){
$(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: "easeInBounce"})
});
});
</script>
I had taken this script from a tutorial, so would have expected it to work. It seems that the easing is not being passed from page to the script?
Any help appreciated.
I've got an Unordered List setup, I would like to apply the simple elastic property used in jQuery. When running the script, I keep getting an JavaScript Error :
Error: D.easing[this.options.easing || (D.easing.swing ? "swing" : "linear")] is not a function Source File: jquery-pack.js?1296815924
The Java is working but it is not creating the desired effect. My jQuery Code is :
<script type="text/javascript">
$(document).ready(function(){
//When mouse rolls over
$("li").mouseover(function(){
$(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: "easeOutElastic"})
});
$("li").mouseout(function(){
$(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: "easeInBounce"})
});
});
</script>
I had taken this script from a tutorial, so would have expected it to work. It seems that the easing is not being passed from page to the script?
Any help appreciated.
Share Improve this question asked Feb 4, 2011 at 10:45 StuBlackettStuBlackett 3,84915 gold badges71 silver badges116 bronze badges2 Answers
Reset to default 4The easeOutElastic
and easeInBounce
easing functions are defined by the jQuery UI plugin, not by the core jQuery framework.
You'll have to include that plugin in your page.
You have to include an easing library like this one: http://gsgd.co.uk/sandbox/jquery/easing/
@Frédéric Hamidi No need for the whole jQuery UI there...
本文标签: javascriptjQuery Easing IssueStack Overflow
版权声明:本文标题:javascript - jQuery Easing Issue - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744079055a2587290.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论