views:

480

answers:

2

Hi

is there a jquery plugin for progress bar that can count down to a specified date automatically.

I found some progress bars but none can do this automatically.

what I want to do is that the plugin calculate time remaining between two values and display the progress in a progress bar.

thanks

+2  A: 

I think you won't have much luck with this, because this is a highly specialized requirement.

But you can easily code this yourself:

  • Use a normal progressbar
  • Set the progressbar minimum to 0 and the maximum value to the number of seconds between now and then.
  • Use setInterval or the jQuery timer plugin to increment the progressbar every second.

Of course you can use any other interval, besides seconds.

DR
A: 

I think that you should a regular progressbar plugin + this countdown plugin.

The code would be something like this:

$('#hidden').countdown({until: liftoffTime, format: 'HMS', onTick: updateProgressBar}); 

function updateProgressBar(periods) { 
        //update progress bar
}
jbochi