简体   繁体   English

添加一些缓动jQuery

[英]Add some easing jQuery

i want to add some easing but it's not working :/ 我想添加一些缓和但它不起作用:/

$(window).scroll(function() { 
    if ($(this).scrollTop() < 300)
    {
        $(".userbar").animate({top:"0px"}, {duration: 100}, {easing:  easeInOutQuint});
    } 
    else
    {     
        $(".userbar").animate({top:"-70px"}, {duration: 100}, {easing: easeInOutQuint});
    }
});

How is it possible? 这怎么可能?

FIDDLE DEMO FIDDLE DEMO

working fiddle here, your curly brackets were off as well as the quoting. 在这里工作小提琴,你的花括号和引用都是关闭的。

FIDDLE DEMO FIDDLE DEMO

$(".userbar").animate({left:"0px"},{duration: 100,easing: 'easeInOutQuint'});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM