Widget:TimerTest2: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 32: | Line 32: | ||
this.play = function(){ | this.play = function(){ | ||
if(!this.Timer.isActive){ | if(!this.Timer.isActive){ | ||
window. | window.Timer1.play().once(); | ||
} | } | ||
}; | }; | ||
Line 45: | Line 45: | ||
currentTime -=incrementTime; | currentTime -=incrementTime; | ||
if(currentTime === 100){ | if(currentTime === 100){ | ||
window.Timer1.pause(); | |||
alert("Click OK to continue accruing CME Time"); | alert("Click OK to continue accruing CME Time"); | ||
window.Timer2.pause().once(); | |||
currentTime = 5000; | currentTime = 5000; | ||
} | } | ||
Line 53: | Line 53: | ||
init = function(){ | init = function(){ | ||
$timer2 = $('#output2'); | $timer2 = $('#output2'); | ||
window.Timer2 = $.timer(updateTimer, incrementTime, true); | |||
}; | }; | ||
this.resetTimer = function(){ | this.resetTimer = function(){ | ||
currentTime = 120000; | currentTime = 120000; | ||
if(! | if(!window.Timer2.isActive){ | ||
window.Timer2.play().once(); | |||
} | } | ||
window.Timer1.play(); | |||
} | } | ||
$(init); | $(init); |