Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var czasy = [43,];
- var dalej = false;
- var secs;
- var timerID = null;
- var timerRunning = false;
- var delay = 1000;
- var obecnie = 0;
- var cwicz = 0;
- var typy = new Array();
- function InitializeTimer(s)
- {
- // Set the length of the timer, in seconds
- $('#btnDalej').attr('disabled', 'disabled');
- secs = s;
- StopTheClock();
- StartTheTimer();
- }
- function StopTheClock()
- {
- if(timerRunning)
- {
- clearTimeout(timerID);
- }
- timerRunning = false;
- }
- function StartTheTimer()
- {
- if (secs == 0)
- {
- StopTheClock();
- $('#btnDalej').removeAttr('disabled');
- }
- else
- {
- self.status = secs;
- secs = secs - 1;
- timerRunning = true;
- timerID = self.setTimeout("StartTheTimer()", delay);
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment