Need to run jQuery and Mootools side by side

You can run both jQuery and Mootools libraries on the same site, but there is a trick.

Add the link jQuery.noConflict(); to that last line in your jQuery js libary (jquery-1.3.2.min.js)

This will change the namespace that jQuery uses from $ to jQuery.  This way jQuery and Mootools won’t step all over each other.

You do have to change all your jQuery functions to use jQuery instead of $.

I assume this works also if you trying to integrate jQuery with the ASP.NET Ajax libraries, but I have not tested it in that scenario.

Here is a link explaining in more detail.
http://docs.jquery.com/Core/jQuery.noConflict

Advertisements

2 thoughts on “Need to run jQuery and Mootools side by side

Got something to add?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s