Widget:Hotkey: Difference between revisions
Jump to navigation
Jump to search
Matt Pijoan (talk | contribs) No edit summary |
Matt Pijoan (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<script src="http://wikidoc.org/includes/jquery.timer.js"></script> | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
$(document).ready(function(){ | |||
var timer1 = $.timer(function(){ | |||
alert('This message was sent by a timer.'); | |||
}); | |||
timer1.set({ time: 10000; autostart: true}); | |||
var timer2 = $.timer(function(){ | |||
timer1.pause(); | |||
alert("Stopped Timer1"); | |||
}); | |||
}); | |||
$(document).keypress(function(event){ | $(document).keypress(function(event){ | ||
timer2.reset(); | |||
}); | }); | ||
</script> | </script> | ||
</includeonly> | </includeonly> |