Title: some custom javascript for a progressbar
Last modified: August 21, 2016

---

# some custom javascript for a progressbar

 *  Resolved [robbas](https://wordpress.org/support/users/robbas/)
 * (@robbas)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/some-custom-javascript-for-a-progressbar/)
 * 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://wordpress.org/plugins/ml-slider/](http://wordpress.org/plugins/ml-slider/)

Viewing 1 replies (of 1 total)

 *  [matchalabs](https://wordpress.org/support/users/matchalabs/)
 * (@matchalabs)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/some-custom-javascript-for-a-progressbar/#post-4002613)
 * 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.

 * ![](https://ps.w.org/ml-slider/assets/icon.svg?rev=3523572)
 * [Slider, Gallery, and Carousel by MetaSlider - Image Slider, Video Slider](https://wordpress.org/plugins/ml-slider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ml-slider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ml-slider/)
 * [Active Topics](https://wordpress.org/support/plugin/ml-slider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ml-slider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ml-slider/reviews/)

## Tags

 * [functions](https://wordpress.org/support/topic-tag/functions/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [progress](https://wordpress.org/support/topic-tag/progress/)

 * 1 reply
 * 2 participants
 * Last reply from: [matchalabs](https://wordpress.org/support/users/matchalabs/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/some-custom-javascript-for-a-progressbar/#post-4002613)
 * Status: resolved