动漫女主被揉胸被吃奶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.

动漫女主被揉胸被吃奶

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


动漫女主被揉胸被吃奶

MooTools Selectors

Selectors for DOM Elements

// get elements by class$$('.foo'); // or even: document.getElements('.foo');// selector with different elements$$('div.foo, div.bar, div.bar a');// get a single elementdocument.getElement('div.foo');

Ajax!

MooTools uses a Class called Request.

// create a new Class instancevar 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:myRequest.send(data);

To send a form it can be even more simple!

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

How to create new DOM elements

A simple MooTools Element example.

// the short waynew Element('div#bar.foo');// using the element constructornew Element('div', {'class': 'foo',id: 'bar'});

Event handlers

Attach events to be updated on what's happening!

// attach a click event o a elementmyElement.addEvent('click', function(){alert('clicked!');});// attach several events at a timemyElement.addEvents({mouseover: function(){alert('mouseover');},click: function(){alert('click');}});

You can also remove, fire or clone events!

// remove a eventmyElement.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 classthis.parent(age);this.name = name;}});var myCat = new Cat('Micia', 20);alert(myCat.name); // 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...