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 13: | Line 13: | ||
}); | }); | ||
timer2.set({ time: 5000, autostart: true}); | timer2.set({ time: 5000, autostart: true}); | ||
$(document).keypress(actionTaken) | $(document).keypress({timer1, timer2},actionTaken) | ||
$(document).click(actionTaken) | $(document).click(actionTaken) | ||
function actionTaken(event){ | function actionTaken(event){ | ||
if(!timer1.isActive){ | if(!event.data.timer1.isActive){ | ||
timer1.play(); | event.data.timer1.play(); | ||
} | } | ||
timer2.reset(); | event.data.timer2.reset(); | ||
} | } | ||
}); | }); |