Using jQuery and Prototype together

Some time we need to use jQuery and Prototype together. To resolve the conflicting between libraries, jQuery has built-in solution. Its noConflict() method is very handy and useful.

 // now use jQuery via jQuery(...)
   //jQuery stuff
 // for Prototype use $(...)

Using jQuery everytime instead of ‘$’ seems very tedious, I think. But don’t worry, :D, there is one simple solution. You can use variable like shown below.

var $j = jQuery.noConflict();

Now you can use it as


Leave a Reply

Your email address will not be published. Required fields are marked *