Sunday, August 16, 2009

Using multiple JavaScript libraries (Prototype, MooTools, jQuery)

I'm a fan of MooTools (a JavaScript library), and most of the tools I use are based on this library. That said, one of the best JS around is LightBox, which is based on Prototype. However, when I tried using both MooTools & Prototype libraries in the same webpage it failed. I was sure there's a solution so I kept digging in, but I couldn't find any.

Another JS library - jQuery has a special computability function called noConflict which solves those problems, but both MooTools & Prototype lack that functionality.

The only solution I could find: Choose one library - MooTools or Prototype, and use only that library. There are similar implementation of most tools in both libraries.

No comments: