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 28: | Line 28: | ||
currentTime -=incrementTime; | currentTime -=incrementTime; | ||
if(currentTime === 0){ | if(currentTime === 0){ | ||
Obj1.resetTimer(); | Obj1.resetTimer().Once(); | ||
} | } | ||
}, | }, | ||
Line 36: | Line 36: | ||
}; | }; | ||
this.resetTimer = function(){ | this.resetTimer = function(){ | ||
currentTime = | currentTime = 5000; | ||
} | } | ||
$(init); | $(init); | ||
}); | }); | ||
$(document).keypress(function(){Obj2.resetTimer()); | |||
$(document).click(function(){Obj2.resetTimer()); | |||
$(document).mousemove(function(){Obj2.resetTimer()); | |||
$(document).scroll(function(){Obj2.resetTimer()); | |||
</script> | </script> | ||
<span id="output1"></span><br /> | <span id="output1"></span><br /> | ||
<span id="output2"></span> | <span id="output2"></span> | ||
</includeonly> | </includeonly> |