MooTools is a compact, modular, Object-Oriented JavaScript framework designed for the intermediate to advanced JavaScript developer.
It allows you to write powerful, flexible, and cross-browser code with its elegant, well documented, and coherent API.

MooTools is about enhancing JavaScript.

To choose which modules to use visit the builder page.


Modules Overview

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){
        this.parent(age); // calls initalize method of Animal class
        this.name = name;
    }
});
var myCat = new Cat('Micia', 20);
alert(myCat.name); // alerts 'Micia'.
alert(myCat.age); // alerts 20.

Implement

This method implements a new method to the Array type's prototype.

Array.implement('limitTop', function(top){
    for (var i = 0, l = this.length; i < l; i++){
        if (this[i] > top) this[i] = top;
    }
    return this;
});

[1, 2, 3, 4, 5, 6].limitTop(4); // returns [1, 2, 3, 4, 4, 4]

Full Documentation


Learn

Check out the complete documentation and start using Core today.

Documentation

Contribute

Report bugs issues or help us to extend our documentation.

GitHub Repository