/ Published in: JavaScript
via [http://ryanflorence.com/mootools-for-beginners-part-5-native-extensions/](http://ryanflorence.com/mootools-for-beginners-part-5-native-extensions/)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
window.addEvent("domready", function() { var log = $("log"); var count = 0; var addDot = function() { if (count < 20) { this.set("text", this.get("text") + "."); count++; } else { log.empty(); count = 0; } }; var myPeriodical = addDot.periodical(50, log); (function() { $clear(myPeriodical); }).delay(4000); });
URL: http://jsfiddle.net/EXbB3/