Search Stylesheet Selectors with MooTools

You should already know that MooTools has Fx.Morph, that allows you to animate multiple css properties on an element and you can also pass it a selector string so you don\’t have to type out all of the properties.

Well, you can also pull these properties by using an undocumented method in MooTools, as I just learned from Mark Obcena. How? It\’s very simple as you will see. Continue reading Search Stylesheet Selectors with MooTools

MooTools TextOverlay Class

Some classes I\’ve come across do a lot and are inflexible. I\’ve seen some that are semantically incorrect when it comes to creating/using elements that the user has no control over. So I\’ve been mulling over the idea of rewriting/cleaning/correcting some of these classes that I come across in hopes to make them flexible and simple. Well, I decided to have a go at it, obviously

I understand it\’s like re-inventing the wheel. But in order to improve, we should always scrutinize work because a better solution may be available.

Here\’s my first attempt, with the MooTools class, TextOverlay. If you look closely, it\’s MooTools-More OverText modified to give the user more options. Continue reading MooTools TextOverlay Class

MooTools 1.2.2 and More Released!

Valerio Proietti just posted the release of MooTools 1.2.2 and MooTools More (1.2.2.1).

Looks like there are some goodies from the Core:

MooTools 1.2.2 is a mainly a bug fix release but it also includes an almost entirely new Class.js. The reasoning behind this is that the old Class.js didn’t play nicely with some advanced usages of this.parent() present in the new MooTools-More. We already had the script ready and tested in the MooTools 2.0 branch so we simply “backported” it to 1.2.2. Other than providing the parent fixes, the new Class also features a much more robust inheritance model, especially when dealing with objects.

And something for the More:

One of the new features of MooTools-More, since the last RC, is that it is now possible access the previous state of overwritten methods of classes through Class.refractor.

And last bit of exciting news: quick/regular new feature bi-weekly releases.

Way to go team! Thank you for the awesome work!

Sly, New Selector Engine & How to Use in MooTools

You\’ve heard of selector engines right? The engine that parses the HTML to match a string argument to return matching HTML elements? How about Sizzle and Peppy (two fast selector engines) that was released? Or how a couple JS frameworks were implementing Sizzle and the MooTools dev team decided not to follow suit?

Now, have you heard of Sly, the new selector engine on the block? No? That\’s because Harald Kirschner just released it yesterday, 03/25/09, and I can\’t tell you how awesome it is.. or can I?

I\’ll start you off with a brief description… and graphs! Continue reading Sly, New Selector Engine & How to Use in MooTools

Aaron Newton\’s Event Delegation for MooTools

I just learned of Aaron Newton\’s Event.Delegate.js and think it is amazing. Why is it amazing?

Event delegation is a common practice where by you attach an event listener to a parent object to monitor its children rather than attach events to all the children. It’s far more efficient when you have numerous items on a page that you want to interact with.

The examples below should give you a better idea how awesome it is.
Continue reading Aaron Newton\’s Event Delegation for MooTools

Implement Other Selector Engines (e.g. Sizzle or Peppy) into MooTools?

Not too long ago announcements of two new selector engines came on the scene, Peppy by James Donaghue and Sizzle by John Resig. At the time I had a fleeting thought of how cool it would be if MooTools was as fast or faster than Peppy and Sizzle.

Yesterday, Ajaxian tells us that the Dojo Community will vote on whether they implement the Sizzle selector engine instead of using their own.

Just after reading that I thought whether MooTools would benefit from implementing a selector engine instead of using their own. Apparently I was not alone in this thought as Aaron Newton has posted his thoughts and pros/cons. Here\’s my two cents. Continue reading Implement Other Selector Engines (e.g. Sizzle or Peppy) into MooTools?