jquery animate or ease scroll left increment

Viewed 28074
$(document).ready(function(){
    $("#right_arrow").click(function(e) {
        var scrollleftvar = $(window).scrollLeft();
        e.preventDefault()
        $("body").scrollLeft(scrollleftvar + 50);
    });
});

Hi, Im trying to animate or ease the incremental scroll eleft triggered above, but struggling a little, any help would be really appreciated, thank you

2 Answers

I think it works fine:

$('.tag-container').animate({scrollLeft:'+=300'}, 1000, "swing");

use swing method instead of easeOutQuad.

Related