MooTools is a collection of JavaScript utilities designed for the intermediate to advanced JavaScript developer. It allows you to write powerful and flexible code with its elegant, well documented, and coherent APIs.

MooTools code is extensively documented and easy to read, enabling you to extend the functionality to match your requirements.

Open Source License

MooTools libraries are released under the Open Source MIT license which gives you the possibility to use them and modify them in every circumstance.

How to use?

MooTools Selectors

Selectors for DOM Elements

// get elements by class
$$('.foo'); // or even: document.getElements('.foo');

// selector with different elements
$$(',, a');

// get a single element


MooTools uses a Class called Request.

// create a new Class instance
var myRequest = new Request({
    url: 'getMyText.php',
    method: 'get',
    onRequest: function(){
        myElement.set('text', 'loading...');
    onSuccess: function(responseText){
        myElement.set('text', responseText);
    onFailure: function(){
        myElement.set('text', 'Sorry, your request failed :(');

// and to send it:

To send a form it can be even more simple!

// optionally you can add/change the form properties
myForm.set('send', {url: 'contact.php', method: 'get'});

How to create new DOM elements

A simple MooTools Element example.

// the short way
new Element('');

// using the element constructor
new Element('div', {
    'class': 'foo',
    id: 'bar'

Event handlers

Attach events to be updated on what's happening!

// attach a click event o a element
myElement.addEvent('click', function(){

// attach several events at a time
    mouseover: function(){
    click: function(){

You can also remove, fire or clone events!

// remove a event
myElement.removeEvent(type, fn);

MooTools Class

A simple MooTools Class example.

var Animal = new Class({
    initialize: function(age){
        this.age = age;

var Cat = new Class({
    Extends: Animal,
    initialize: function(name, age){
        // calls initalize method of Animal class
        this.parent(age); = name;

var myCat = new Cat('Micia', 20);
alert(; // alerts 'Micia'.
alert(myCat.age); // alerts 20.

Blog Entries

1.5.2 is out!

Today we release MooTools Core versions 1.5.2. In this new version there are some fixes for raised issues and also some new stuff!

You can find the new version in the dist/ folder of the Github repo or on the website....

GitHub Activity

SergioCrisostomo: opened pull request mootools-core#2758

NaridaL: opened issue mootools-core#2757

SergioCrisostomo: opened pull request website#218

SergioCrisostomo: closed pull request mootools-core#2756

oskarkrawczyk: opened pull request mootools-core#2756