Professional Documents
Culture Documents
MooTools For The Rest of Us
MooTools For The Rest of Us
"MooTools for the Rest of Us" is a series of tutorials that demonstrates, by example, implementation of basic
MooTools effects into a template. Using the JoomlaOS template as a reference point, you will learn how to find
the effect you're looking for, create drag-able windows, make them resize-able, fade and adjust DIV's (including live
text resize), and implement ajax links (Links that need no page refresh!).
This is not a tutorial series on javascript, nor do you need to know any to benefit from this series. You will learn how
to implement MooTools by example of work already provided...this is "MooTools for Dummies" so to speak.
Special Note: The snippets below are from an older version of MooTools. MooTools 1.0 has a newer syntax and
we will be replacing the below code with the newer code soon. If you would like to get an older version of mootools
so you can use the snippets below, just download the JoomlaOS template and the script is inside.
$('yourLinkId').addEvent('click', function(){
yourDiveffect.custom({
window.onload=function(){
var draggables = $S('.yourClass');
draggables.each(function(el){
el.makeDraggable({handle: el.getElementsBySelector('.yourClass')[0]});
el.makeResizable({handle: el.getElementsBySelector('.yourClass')[0]});
});
}
Example HTML:
Drag Here 1
NOTE: Place this inside a link you want to have in the template.