mootools example!
mootools is the next version in the Mad4Milk.com library set. The guys took the moo.ajax, moo.fx and the prototype.lite library and re-worked it to exclude the prototype part of the library and combine all the moo libraries in one library. When you go download the scripts, you can decide which add-ons and plug-ins you would like to include.
Note: the moo.ajax library is deprecated and you will need to replace it with the mootools library.
If you looked at my moo.ajax example, you will note that there is only one difference in the implementation of the ajax library.
moo.ajax:
new ajax(’stii.php’, {postBody: ‘name=’ + name + ‘&msg=’ + mesg, update: $(’myelementid’), onComplete: myFunction});
mootools:
new ajax(’stii.php’, {postBody: ‘name=’ + name + ‘&msg=’ + mesg, update: $(’myelementid’), onComplete: myFunction}).request();
As you can see, the only difference is the request() at the end.
In the mootools example, I combined the ajax call with an effect to change the <div> element style.
There are many, many options in the mootools library. Here I have used the Fx.Style class to manipulate the <div> element height, width and opacity.
function myFunction(){
var myEffects = new fx.Styles(’myelementid’, {duration: 500, transition: fx.Transitions.linear});
myEffects.custom({
‘height’: [40, 100],
‘width’: [400, 300],
‘opacity’: [1,0.3]
});
}
In this example, the font color changes from white to red.
function myFunction(){
var myEffects = new fx.Color(’myelementid’, ‘color’, {duration: 500});
myEffects.toColor(’f00′);
}
TIP: The effect ALWAYS looks better in Firefox. Don’t believe me? Try it in IE then in Firefox or Flock and see the difference
Blogged with Flock
ajax, javascript, moo.ajax, mootools Stii
mootools!
Even working for yourself sometimes means that you cannot always do as you wish… I’ve been planning to look into Netbeans for quite some time now, but to date it stil have not realised… But hey, soon!
In the meantime, the guys from Mad4Milk.com brought out their own Javascript library, called mootools. The libraries I’ve reviewed earlier was all basd on the prototype library. mootools is their own developed library! And still, as in moo.ajax and moo.fx fashion, the footprints is still small.
Since I’m probably going to use the libs in my projects, I thought lets first have a look at the mootools library, then we’ll continue out netbeansdreams!
Coming up within the next few days: mootools example!
Blogged with Flock
ajax, javascript, moo.ajax, mootools Stii



















