Dependencies:
- Class.js, By John Resig http://ejohn.org/ (licensed under MIT), see: http://ejohn.org/blog/simple-javascript-inheritance/
- jQuery
Usage:
var periodicalExecutor = new PeriodicalExecutor({
delay: 10, // 10ms between execution
autoStart: false, // autostart?
execFunction: callback, // callback function
once: false // execute only once?
});
periodicalExecutor.start(); // Starts periodical execution of callback
periodicalExecutor.stop(); // Stops execution