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.6.0 is out!

Today marks the release of MooTools Core and More versions 1.6.0. This is a minor revision that delivers a number of bug fixes as well as the introduction of new features.

The main new adition is Class.Thenab...

GitHub Activity

NestGia: opened issue mootools-core#2842

Pikamander2: opened issue mootools-more#1363

geoffoss: closed pull request mootools-core#2841

geoffoss: opened pull request mootools-core#2841

Knkytek: opened issue mootools-core#2840

Latest Tweets