Mootools periodical funcion and time rewind
- by hsz
Hello !
I have some function taht is caller periodically:
var func = function() {
alert('Hello world!');
};
func.periodical(5000);
This function is also called with click event:
$('element').addEvent('click', function(){
func();
});
The timer starts and counts 2500msec, then I click $('element'), func() is executed and I want right now to reset the timer that func() will not be called in next 2500msec but in following 5000msec.
How to do that ?