Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript anythingSlider : Goto Slide

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35670
    amygo
    Participant

    Is there a way to really “skip” the slides when going from say slide 1 to slide 20, instead of “sliding” to it.? It currently slides through the rest, in reaching 20.

    #92862
    Mottie
    Member

    If you want ALL slides to jump immediately to the slide, then just set the “animationTime” option to zero (demo):

    $('#slider').anythingSlider({
    // How long the slideshow transition takes (in milliseconds)
    animationTime: 0
    });

    if you want to jump to a specific slide, say from an external link, then you can set the animation time to zero dynamically, then back to the original value in the callback function (demo).

    $('.jump').click(function(){
    var slider = $('#slider'),
    data = slider.data('AnythingSlider');

    // set animation time to zero
    data.options.animationTime = 0;

    // go to 5th slide, then in the callback reset the animation time
    slider.anythingSlider(5, function(){
    data.options.animationTime = 600;
    });

    });
    #92920
    amygo
    Participant

    Works beautifully… Thanks Mottie

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.