From c0204244bc68b24ef37cebeab0c133a0c2e3ee0e Mon Sep 17 00:00:00 2001 From: Benoit Rospars Date: Fri, 16 Jan 2015 09:08:39 +0100 Subject: [PATCH] Added: variable slide duration --- jquery.fractionslider.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jquery.fractionslider.js b/jquery.fractionslider.js index f3bf035..d281014 100644 --- a/jquery.fractionslider.js +++ b/jquery.fractionslider.js @@ -418,6 +418,16 @@ vars.init = false; slideChangeControler(true); } else { + + /** ---- Implementation for variable slide duration ---- **/ + var slideDuration = slider.children('.slide:eq(' + vars.currentSlide + ')').attr("data-duration"); + if(slideDuration != undefined){ + timeout = slideDuration; + }else{ + timeout = options.timeout; + } + /* ----- */ + // timeout after slide is complete timeouts.push(setTimeout(function() { // stops the slider after first slide (only when slide count = 1)