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 = 0;
         currentTime = 5000;
        this.Timer.stop().once();
     }
     }
$(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>

Revision as of 15:53, 11 April 2014