Search code examples
javascriptjqueryprototypejsconflict

How can we resolve conflict between prototype and jQuery?


To resolve a conflict between jQuery and prototype,
is there any way other than asking jQuery to resolve via

jQuery.noConflict

and using jQuery instead of $('code').code;

Can't we ask prototype $ to step down and resolve.


Solution

  • PrototypeJS adds a bit more to the global JavaScript namespace than jQuery does. For example, it adds meanings for: Ajax, $, $$, $F, Abstract, Form, $A, $H, $R, $w. You can look at a complete list of classes and utilities at api.prototypejs.org.

    So the advice you've gotten is correct, There's no simple equivalent to jQuery.noConflict() for PrototypeJS.