andre34
andre34

Reputation: 35

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

Upvotes: 0

Views: 76

Answers (1)

erikrunia
erikrunia

Reputation: 2383

working fiddle here, your curly brackets were off as well as the quoting.

FIDDLE DEMO

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

Upvotes: 2

Related Questions