The MooTorial
http://www.mootorial.com/wiki/
Mon, 14 Jul 2014 23:36:04 -0600FeedCreator 1.7.2-ppt DokuWikihttp://www.mootorial.com/wiki/lib/images/favicon.icoThe MooTorial
http://www.mootorial.com/wiki/
Getting Started: What is MooTools?
http://www.mootorial.com/wiki/mootorial/00-whatisit?rev=1334792657&do=diff1334792657
MooTools is a lightweight abstraction layer between the browser and the code you write (this is really the definition of nearly every js framework out there - Prototype, Dojo, jQuery, YUI, etc). It offers more functionality and richer tools for writing javascript, taking what has historically been painful and fraught with buggy environments (the browsers) and presenting you with a much more reliable environment. By adding it to your environment (i.e. including the script in your page) you are ab…mootorialWed, 18 Apr 2012 17:44:17 -0600Core
http://www.mootorial.com/wiki/mootorial/01-core?rev=1303284659&do=diff1303284659
Core.js represents the first file in the library on which all others depend. Here are the docs for Core.js
MooTools
MooTools has a namespace which contains a version number. This namespace isn't used for much else, but it's useful if you need to query the page to see what version of MooTools is in the environment:mootorialWed, 20 Apr 2011 01:30:59 -0600Color
http://www.mootorial.com/wiki/mootorial/08-plugins/02-utilityplugins/01-color?rev=1295013589&do=diff1295013589
The Color class provides utilities for handling all sorts of color functions in javascript including blending, inverting, setting hue, saturation, and brightness. Here is the documentation for Color.js.
Constructor
/*you can use hex values*/
var black = new Color('#000');
var white = new Color('#fff');
/*you can use numerical color values*/
var purple = new Color([255,0,255]);
/* mix black with white and purple, each time at 10% of the new color*/
var darkpurple = black.mix(white, purple, 10…mootorial:08-plugins:02-utilitypluginsFri, 14 Jan 2011 06:59:49 -0600Events
http://www.mootorial.com/wiki/mootorial/03-native/05-event?rev=1295002411&do=diff1295002411
The Events class is a collection of functions for handling events across browsers. Here is the documentation for Event.js.
Whenever you add an event to a DOM element (not to be confused with the //Events// class in Class.Extras) the argument passed to that function will be the event native. This has been extended like other natives to have additional properties by MooTools.mootorial:03-nativeFri, 14 Jan 2011 03:53:31 -0600Hash
http://www.mootorial.com/wiki/mootorial/03-native/04-hash?rev=1295002289&do=diff1295002289
Here is the documentation for Hash.js.
The Hash returns a hash map object with various helper functions for managing a JavaScript object. We must use .set, .get, and .remove to add/change, retrieve and remove values; we must not access the internal object directly. null values are allowed. Pass in an object to convert to a Hash.mootorial:03-nativeFri, 14 Jan 2011 03:51:29 -0600Strings
http://www.mootorial.com/wiki/mootorial/03-native/03-string?rev=1295002116&do=diff1295002116
Strings
Here is the documentation page for String.js.
String.test
Tests a string against a regular expression; optional second parameter for Regex options. Accepts regular expressions in both string and regexp mode.
"I like cookies".test("cookie"); // returns truemootorial:03-nativeFri, 14 Jan 2011 03:48:36 -0600Numbers
http://www.mootorial.com/wiki/mootorial/03-native/02-number?rev=1295002093&do=diff1295002093
Here is the documentation for Number.js.
Number.toInt, .toFloat
Number.toInt() just returns the number; useful because toInt must work on both Strings and Numbers. Note that if you call .toInt() on a float, you'll get an integer back.
var x = 10;
x.toInt(); //returns 10mootorial:03-nativeFri, 14 Jan 2011 03:48:13 -0600Arrays
http://www.mootorial.com/wiki/mootorial/03-native/00-array?rev=1295001901&do=diff1295001901
Here is the documentation for Array.js.
Array.each
Array.each() iterates through the array executing the specified function for each item in the array. The anonymous function can be passed two arguments (optional) - the item and the index.
.each() is really just a pointer to .forEach, which MooTools implements for browsers that don't already support it. Here's the documentation at Mozilla on .forEach.mootorial:03-nativeFri, 14 Jan 2011 03:45:01 -0600Functions
http://www.mootorial.com/wiki/mootorial/03-native/01-function?rev=1295001463&do=diff1295001463
Here is the documentation for Function.js.
Function.create
.create automatically wraps the function into another one with the defined set of functionalities, therefore shortens your code. It's used throughout mootools itself, as the foundation for .pass, .bind, .delay, .periodical.mootorial:03-nativeFri, 14 Jan 2011 03:37:43 -0600Drag.Move
http://www.mootorial.com/wiki/mootorial/08-plugins/01-drag/01-drag.move?rev=1295001055&do=diff1295001055
Here is the documentation for Drag.Move.js.
Drag.Move extends Drag to support moving an element around the page.
The usage is pretty straight forward:
new Drag.Move($('fxTarget'));
It takes all the options that Drag takes and adds two new ones:mootorial:08-plugins:01-dragFri, 14 Jan 2011 03:30:55 -0600Class.Extras - old revision restored
http://www.mootorial.com/wiki/mootorial/02-class/01-class.extras?rev=1283136429&do=diff1283136429
Class.Extras
This file contains a few basic functionalities that are useful for many types of classes. You can add the functionality in these extras to any one of your classes easily by using Class.implement.
Here are the docs for Class.Extras.jsAaron Newtonmootorial:02-classSun, 29 Aug 2010 20:47:09 -0600