带有.a​​nimate的jQuery Custom Easing插件

Kee*_*fer 1 jquery jquery-easing easing jquery-animate

我正在使用jQuery插件进行自定义Easing(jQuery Easing v1.3 -http://gsgd.co.uk/sandbox/jquery/easing/),为我的jQuery Tools可滚动实例添加自定义缓动,如下所示:

$(".historyScrollable").scrollable({ easing:"easeInOutCubic"}).navigator();

我希望也能使用jQuery Easing插件与.animate函数一起使用

我试过像这样使用它:

$(this).find('div').stop().animate({'marginLeft':'-280px'},200,easeInOutCubic);

但它说没有定义"easeInOutCubic".我正在做的是什么,而我的语法错了?我也试过使用specialEasing,但似乎也没有用:

$(this).find('div').stop().animate({'marginLeft':'-280px'},{duration:200, customEasing:{'marginLeft':'easeInOutCubic'}});

raf*_*.js 5

.animate({'marginLeft':'-280px'},200,"easeInOutCubic");
Run Code Online (Sandbox Code Playgroud)

用引号!