• Resolved robbas

    (@robbas)


    Dear creators of meta-slider,

    Is it possible to save / like live save the current pauseTime or slideDelay? like if i have a pauseTime = 10000, can i reach the current time passed, so that i know how much time / miliseconds till i reach the full 100% “and thus go to my next slide/image”

    The functions.php with beforeChange and afterChange worked out perfect, but now i’m kinda struggling to figure out how i could wright a function with a var that will tell how much miliseconds left till the next slide.

    I hope i’m not asking the wrong way, not that i want to know how to make this work, i mostly got i figured out. But how to reach and wright the javascript with the live/life figures “like pauseTime for example” from the slider, well i dont know that part.

    Thanks in Advance

    Regards

    Robbas

    http://ww.wp.xz.cn/plugins/ml-slider/

Viewing 1 replies (of 1 total)
  • Hi Robbas,

    Psuedo-ish code… I would go for something like:

    timeRemaining = 7000 // you could get this dynamically from flexslider I suspect
    countDownIncrement = 200 // how often to update the bar width (in ms)
    
    progressBar() {
       timeRemaining = timeRemaining - countDownIncrement
       [work out your percentages and CSS here]
       call progressBar() with a delay of countDownIncrement
    }
    
    progressBar();

    Basically a recursive loop which ticks over ever X ms and counts down the total pause time. You’d need to find a way of getting out of that loop.

    Regards,
    Tom.

Viewing 1 replies (of 1 total)

The topic ‘some custom javascript for a progressbar’ is closed to new replies.