DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Michael has posted 2 posts at DZone. View Full User Profile

MooTools Starter

03.05.2010
| 1953 views |
  • submit to reddit
        Starting with an anonymous function
window.addEvent('domready', function() {
    // Put your code here, similar to jQUery's jQuery(function($){});
});

Starting with a predefined function
var myFunction = function() {
    alert('MooTools!');
};

window.addEvent('domready', myFunction());

Starting with a predefined function and an anonymous function
window.addEvent('domready', function() {
    myFunction();
    
    // Additional code
});