Implementing .css() and .attr() in MooTools 1.2.3

Submitted by admin on Fri, 08/14/2009 - 14:08

Very rarely does a developer have the ability to work with just one framework. Often a developer needs to float between MooTools and jQuery. As you can imagine, doing so can make a developer loopy due to the syntax difference. One of the small differences that gets used often is jQuery’s attr() and css() vs. MooTools’ set() and setStyle(). I’ve implemented css() and attr() into MooTools for jQuery users.

I personally don’t prefer this syntax in MooTools but hopefully this helps someone!Don't forget to follow me on Twitter and be sure to visit Script & Style for the best Javascript and CSS articles around!