Tuesday, 27 August 2013

How can I create a duration slider using seconds as raw value in jQuery?

How can I create a duration slider using seconds as raw value in jQuery?

Let's say I have an input that is a text field.
If I typed 3600 then the value would be 60 minutes. I'm tracking the value
of duration based on seconds.
How could I dynamically display a slider that showed seconds if under 1
minute, and over 1 minute it would say 1 minute and x seconds, etc... and
if over a hour it would go 1 hour and 30 minutes and 5 seconds, and so on.
Limited to hours/minutes/seconds.
This slider is just a UI wrapper for seconds as the real value for the input.

No comments:

Post a Comment