Skip to content Skip to sidebar Skip to footer

My Jquery Slider Refresh Rate Won't Update Live

I am trying to develop a simple jquery slider, the slier switches between images and text each three seconds by default (var segundos = 3;), the slider has a button which acts as a

Solution 1:

It has to go like this: pause slider > change default seconds > play slider > see results

My objective is to make it so it changes the refresh rate while the slider is up and running.

That's because you never do anything to your slideInterval when you increase/decrease the slide interval time (segundos).

Answer :

Add function to restart your slideInterval like so:

function_restartSlide() {     
      clearInterval(slideInterval);
      slideInterval = setInterval(swapSlides, segundos);   
 } 

jsfiddle link https://jsfiddle.net/sudarpochong/2za1ccra/1/

Post a Comment for "My Jquery Slider Refresh Rate Won't Update Live"