|Joachim Van der Auwera||Jun 17, 2009 12:47 am|
|Angelo Chen||Jun 17, 2009 1:07 am|
|Andy Pahne||Jun 17, 2009 2:57 am|
|Onno Scheffers||Jun 17, 2009 3:07 am|
|Onno Scheffers||Jun 17, 2009 3:34 am|
|Angelo Chen||Jun 17, 2009 3:40 am|
|Joachim Van der Auwera||Jun 17, 2009 4:10 am|
|Joachim Van der Auwera||Jun 17, 2009 4:16 am|
|Andy Pahne||Jun 17, 2009 5:18 am|
|Onno Scheffers||Jun 17, 2009 5:26 am|
|Onno Scheffers||Jun 17, 2009 5:42 am|
|Onno Scheffers||Jun 17, 2009 5:47 am|
|Michael Gentry||Jun 17, 2009 5:56 am|
|Massimo Lusetti||Jun 17, 2009 6:50 am|
|Andy Pahne||Jun 17, 2009 7:00 am|
|Massimo Lusetti||Jun 17, 2009 7:03 am|
|Subject:||Re: integrating jQuery components|
|From:||Onno Scheffers (on...@piraya.nl)|
|Date:||Jun 17, 2009 3:34:16 am|
This issue only really applies if you are using both Prototype and jQuery in your application. I think most people won't want to do that once jQuery is officially supported.
If both Prototype and jQuery are used in your application, then ordering of the included libraries is imporant. jQuery assigns itself to the $-variable but stores whatever was in that variable before. Using jQuery.noConflict(), whatever was in the $-variable will be put back there.
Internally and in 3rd party jQuery plugins, the $-variable should never be used, but the jQuery namespace is used instead. The short $-notation is only there for end-users and can easily be reassigned to something else.
Sadly Prototype and its plugins are not written to work against their own namespace as far as I can tell. Therefore they rely on the $-var being assigned to Prototype.
I also added the jQuery.noConflict()-call to the jquery.js file in my applications so far.
But this is an area that needs some work when adding jQuery support. By default, you don't want to force the noConflict-mode onto users, since they like programming against the $-notation. But if both Prototype and jQuery are used, or even forced upon you by 3rd party components, then we should include the jQuery noConflict() call right after jQuery has been included.