Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

MooTools Starter

DZone's Guide to

MooTools Starter

·
Free Resource
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
});
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}