e.g.:
scripts[] = [...]
scripts[] = scripts/jquery-132.js
scripts[] = scripts/jquery.foo.js
scripts[] = scripts/jquery-noconflict.js
scripts[] = [...]
Last updated September 16, 2009. Created by Signify on September 16, 2009.
Log in to edit this page.
or:
Recent versions of jQuery include a noConflict() function which restore the previous definition of the $() function and, optionally, the jQuery() function.
This provides a way of using later versions of jQuery for particular purposes, without affecting the version that core and contrib are using.
Problem: We want to use the "foo" jQuery plugin in our theme, but it needs jQuery 1.3.
Solution: In our theme's .info file, carefully specify the order of the scripts:
e.g.:
scripts[] = [...]
scripts[] = scripts/jquery-132.js
scripts[] = scripts/jquery.foo.js
scripts[] = scripts/jquery-noconflict.js
scripts[] = [...]
------------------------------
jquery-noconflict.js looks like this:
var jQuery13 = jQuery;
jQuery.noConflict(true);
------------------------------------------
Just use jQuery13() instead of using $() or jQuery()Hello,
Waiting for J! 3.0 which will normally use the great jQuery.
It's still a horrible work to manage jQuery on 2.5.
Is there any plan to add a simple JHTML behaviour Jquery (just to load the jquery) the same way for all components.?
Because my problem is generally not with mootools (there are solution for that), but with website that integrate 3,4 versions of jquery.js. This is a desastre, because the component is loading jquery + jquery plugin, then jquery is reload so the jquery plugins are lost.
What is the best to do :
- Wait for a possible Joomla 2.5 with jquery support (not change the core of joomla, just add a simple behaviour to prevent two modules using jquery to reload jquery)
- To something like:
load Jquery + jquery plugins then save jquery variable in another variable, then use only this variable. ?
Thomas
Did you try this:
http://www.simplifyyourweb.com/index.php/downloads/category/8-loading-jquery
Alfred
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
What I don't understand is why Joomla Core Team to not add a Jquery Behaviour like Mootools to load JQuery lib, so if several modules are using jquery only 1 is loaded.
--
It's "quite" wrong.
1) There are trace of proposal (one by beat at least) several months ago. : https://github.com/joomla/joomla-platform/pull/736
But you are right, I will check in details Beat proposal and the current proposal for the new framework version and see if we can create a plugin for 2.5 and wait not 1.5 :)
--