Search code examples
javascriptjqueryanimationjquery-cycleeasing

jQuery Cycle plugin: scroll slides horizontally at constant speed, without easing


I'm using jQuery Cycle plugin. When I use 'scrollHorz' as the value of fx property, slides move not at constant speed, but with easing (see demo).

How can I make the slides move at constant speed?


Solution

  • Just use

    easing: "linear"
    

    and you should be fine! For example:

    $('#s1').cycle({ 
        fx:     'scrollHorz', 
        easing: 'linear',
        prev:   '#prev1', 
        next:   '#next1', 
        timeout: 0 
    });