1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Swiper slider delay

Discussion in 'JavaScript' started by dany994, Jun 3, 2019.

  1. #1
    Hello! Help put the delay between transitions in the Swiper slider.
    The task is this, after pressing the button forwards, backwards or scrolling with the mouse, the slide should wait for example 3000ms, and only then change.

    This is necessary for the animation to play.

    Here is the slider: https://codepen.io/anakin-skywalker94/pen/qGvEwq

    Thank!
     
    dany994, Jun 3, 2019 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #2
    I'd say you need to go through the api settings and see if there's an option
    http://idangero.us/swiper/api/

    or ask at their forum

    You'll probably find you need to add some code into a renderCustom clause
     
    sarahk, Jun 3, 2019 IP
  3. Naina S

    Naina S Active Member

    Messages:
    203
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    93
    #3
    According to the documents of Swiper Slider you move to the next slide by this code:
    mySwiper.slideNext();
    Code (markup):
    If you want to delay it by 3000 milliseconds then use .setTimeout() method of JavaScript:

    setTimeout(function(){
      mySwiper.slideNext();
    }, 3000);
    
    Code (markup):
     
    Naina S, Jun 16, 2019 IP