-9

I need to set a countdown timer. The time remaining in the format of "00:00:00".

I need to create a countdown timer displaying minutes and seconds within four <span></span> elements.

For example, when I have 56 minutes and 45 secs, its value should be set as follows:

5-with in one span element
6-with in second span element
4-with in third span element
5-with in last span element

or

<span>5</span><span>6</span><span>4</span><span>5</span>
Mateen Ulhaq
  • 24,552
  • 19
  • 101
  • 135
nagendra
  • 31
  • 4
  • Did you Google? http://stackoverflow.com/questions/1191865/code-for-a-simple-javascript-countdown-timer?rq=1 http://stackoverflow.com/questions/460474/how-to-set-a-timer-in-javascript?rq=1 http://stackoverflow.com/questions/2221801/javascript-jquery-time-count-down?rq=1 http://stackoverflow.com/questions/2610580/create-a-count-up-timer-in-javascript-jquery?rq=1 – Mateen Ulhaq Jul 16 '12 at 05:47

1 Answers1

1

This will get you started and push you in the right direction. The rest is up to you.

var start = 5;

function countdown() {
    $("#spanId").html(start--);
    if (start)
       setTimeout(countdown, 1000);
}
countdown();
Adam Rackis
  • 82,527
  • 56
  • 270
  • 393