Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to prevent conflicts between mooTools and Prototype

I know that jQuery.noConflict() is used to avoid conflict between $ of any other library and jQuery.(i.e. Prototype) But lets say, by any chance I am using Prototype, MooTools and jQuery.In that case jQuery.noConflict() will work fine for jQuery and any other library combination, but then what with Prototype and MooTools, if they both use $, how come code /browser will identify it properly. Note:I have never worked with Prototype and MooTools , so I am sorry if my question doesn't make any sense.

like image 696
Wondering Avatar asked Dec 06 '25 18:12

Wondering


2 Answers

Please check this out:

http://mootools.net/blog/2009/06/22/the-dollar-safe-mode/

like image 144
Guillermo Rauch Avatar answered Dec 08 '25 11:12

Guillermo Rauch


If these other frameworks don't have something corresponding to the noConflict option, the last loaded of these frameworks will overwrite the definition of $ with their own, and the first loaded framework will be broken, if they both depend on $

like image 20
David Hedlund Avatar answered Dec 08 '25 11:12

David Hedlund



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!