[英]jQuery Custom Easing Plugin with .animate
I'm using a jQuery plugin for custom Easing (jQuery Easing v1.3 -http://gsgd.co.uk/sandbox/jquery/easing/) to add custom easing to my jQuery Tools scrollable instances like so: 我正在使用jQuery插件进行自定义缓动(jQuery Easing v1.3 -http://gsgd.co.uk/sandbox/jquery/easing/)将自定义缓动添加到jQuery Tools可滚动实例中,如下所示:
$(".historyScrollable").scrollable({ easing:"easeInOutCubic"}).navigator();
I was hoping to also use the jQuery Easing plugin to use with .animate functions 我希望也可以使用jQuery Easing插件与.animate函数一起使用
I've tried using it like this: 我试过这样使用它:
$(this).find('div').stop().animate({'marginLeft':'-280px'},200,easeInOutCubic);
but it says "easeInOutCubic" is not defined. 但表示未定义“ easeInOutCubic”。 Is what I'm doing possible, and I've just got the syntax wrong?
我正在做的事情是可能的,而我的语法错误吗? I tried using specialEasing as well, but didn't seem to work either:
我也尝试使用specialEasing,但似乎也不起作用:
$(this).find('div').stop().animate({'marginLeft':'-280px'},{duration:200, customEasing:{'marginLeft':'easeInOutCubic'}});
.animate({'marginLeft':'-280px'},200,"easeInOutCubic");
使用引号!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.