Search code examples
jquerycycletransitioneffect

jQuery Cycle: How to change transition effect on a running slideshow


i'm using the before: option of the jQuery Cycle plugin to determine whether the user is moving to the left or right through the slideshow, and i'd like to animate accordingly (scrollLeft, scrollRight).

Unfortunately, I cannot find how to alter the plugin's options (the transition effect) while it's running.

Any ideas?


Solution

  • It sounds like this is the effect that you want: http://jsfiddle.net/zvVcD/

    If that's the case, you just need to use the "scrollHorz" effect, and then define previous and next triggers, like so:

    $('#s2').cycle({
        fx: 'scrollHorz',
        speed: 'fast',
        timeout: 0,
        next: '#next2',
        prev: '#prev2'
    });