or:
Resolving jQuery plugin dependencies in Drupal without touching the version
in core (or using jQuery Update)
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.
Example
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:
1. Load the jQuery 1.3 library
2. Load the "foo" plugin library
3. Load and execute a custom "noConflict" script
> 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. ?
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. ?
Van: joomla-dev-general@googlegroups.com
[mailto:joomla-dev-general@googlegroups.com] Namens Thomas PAPIN
Verzonden: vrijdag 20 juli 2012 15:57
Aan: joomla-dev-general@googlegroups.com
Onderwerp: [jgen] Jquery & Joomla < 3.0
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
-- 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-dev-general@googlegroups.com.
To unsubscribe from this group, send email to
joomla-dev-general+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/joomla-dev-general?hl=en-GB.
> 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****
> --
> 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-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-general+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.****
> --
> 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-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-general+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
The plugin is nice and several good options.
With the usage of this plugin, the problem is solved.
The only problem (which is not a problem of this plugin) is that we are
doing some processing just of course of "Joomla Framework".
The plugin parses the page to find the jquery declaratiion and remove them.
This processing is an overhead, necessary because of the not support of
jquery in joomla framework.
We include jquery 1 time, then we include jquery a second time then we
remove 1 jquery. Seems that something is not optimized here.
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.
If the problem is "several version jquery which one ?", like the jquery
easy plugin, you can have a system to only load the max level of Jquery
version requires.
Maybe this is not perfect, maybe there are lot of others solution.. But
it's always better than no solution at all for 2.5 and the answer (jquery
will be part of Joomla 3.0), what about 2.5 support ?
> 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****
> --
> 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-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-general+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.****
> --
> 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-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-general+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
> The plugin is nice and several good options.
> With the usage of this plugin, the problem is solved.
> The only problem (which is not a problem of this plugin) is that we are
> doing some processing just of course of "Joomla Framework".
> The plugin parses the page to find the jquery declaratiion and remove
> them. This processing is an overhead, necessary because of the not support
> of jquery in joomla framework.
> We include jquery 1 time, then we include jquery a second time then we
> remove 1 jquery. Seems that something is not optimized here.
> 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.
> If the problem is "several version jquery which one ?", like the jquery
> easy plugin, you can have a system to only load the max level of Jquery
> version requires.
> Maybe this is not perfect, maybe there are lot of others solution.. But
> it's always better than no solution at all for 2.5 and the answer (jquery
> will be part of Joomla 3.0), what about 2.5 support ?
>> 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****
>> --
>> 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-dev-general@googlegroups.com.
>> To unsubscribe from this group, send email to
>> joomla-dev-general+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/joomla-dev-general?hl=en-GB.****
>> --
>> 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-dev-general@googlegroups.com.
>> To unsubscribe from this group, send email to
>> joomla-dev-general+unsubscribe@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.
Because like you no one has written a set of jQuery behaviors. Not even as an extension.
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 :)
> 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.
> Because like you no one has written a set of jQuery behaviors. Not even as
> an extension.
> Rouven
> --
> 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-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-general+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
> 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 :)
That's not a complete set of behaviors, that's just jQuery.
> 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 :)
> That's not a complete set of behaviors, that's just jQuery.
> Rouven
> --
> 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-dev-general@googlegroups.com.
> To unsubscribe from this group, send email to
> joomla-dev-general+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/joomla-dev-general?hl=en-GB.
> I am not sure to understand your last mail:
> the goal is to create a unique jquery behaviour that can load several versions of jQuery.
> The beat's solution is doing that.
The jQuery behavior is only half the rent - we need jQuery versions of all the other behaviors or at least those frequently used on the site otherwise you just end up loading both frameworks.