Disable Jquery Global

More
13 years 3 months ago #31050 by igcorreia
Since jQuery is a must use library and Joomla 3.0 is using it. Please consider disable jQuery Globaly this is becouse our modules, slideshows and other components already use them. It is easyr to add the Jquery to the jTemaplte and disable it in FC.

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31060 by Rehne
Replied by Rehne on topic Disable Jquery Global
Hi,

i've been thinking about that the last day several times too
because i also load jquery within the template
and to avoid conflicts with other js
it must load at the very beginning/first (before other js are loaded) ... is not the case Flexicontent load jquery

so I think it is really convenient and it should not be that hard ;)

Regards

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31062 by ggppdk
Replied by ggppdk on topic Disable Jquery Global
Is there a:

JHtml::_('behavior.jquery');

in J3.0 ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31065 by igcorreia
Replied by igcorreia on topic Disable Jquery Global
I don't know anything about 3.0 :D yet. grrrrrrrr

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31066 by Rehne
Replied by Rehne on topic Disable Jquery Global
Hi,

ggppdk wrote: Is there a:
JHtml::_('behavior.jquery');
in J3.0 ?

in this way (J3.0)
Code:
JHtml::_('jquery.framework');
docs.joomla.org/Adding_JavaScript

but what i written above / previously
was still for Joomla 2.5 (Bootstrap based Templates)

Regards

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31075 by ggppdk
Replied by ggppdk on topic Disable Jquery Global
So how can we detect if jquery has already been loaded in J2.5 / J1.5 ?

in a system plugin perform a Regular expression search on HTML document,
to identify possible loadings of jquery ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31078 by Rehne
Replied by Rehne on topic Disable Jquery Global

ggppdk wrote: So how can we detect if jquery has already been loaded in J2.5 / J1.5 ?...


may be in this way !?
Code:
/* BOF Fallback load jQuery */ // Currently the latest minified version from Google. Change the version no ?> <script> if (typeof jQuery == 'undefined') { document.write(unescape("%3Cscript src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js' type='text/javascript'%3E%3C/script%3E")); } </script> /* EOF Fallback load Jquery */

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31080 by ggppdk
Replied by ggppdk on topic Disable Jquery Global
I remember trying a similar thing before,
but for some reason did not use it

have you tested this ?


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31086 by Rehne
Replied by Rehne on topic Disable Jquery Global

ggppdk wrote: I remember trying a similar thing before,
but for some reason did not use it

have you tested this ?


i use it in some Joomla Templates
and it works without problems

e.g.
Code:
... <head> <?php // Musthave JS (load here to be at the top / before other JS / before <jdoc:include type="head" /> ) // Currently the latest minified version. Download a new version and change the version nr. here if you want if ($loadJSL_jQuery) { echo('<script src="'.$tpath.'/assets/js/libs/jquery-1.8.2.min.js"></script>'); } ?> <?php if ($loadJSL_jQuery) { /* BOF Fallback load jQuery */ // Currently the latest minified version from Google. Change the version no. here if you want ?> <script> if (typeof jQuery == 'undefined') { document.write(unescape("%3Cscript src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js' type='text/javascript'%3E%3C/script%3E")); } </script> <?php } /* EOF Fallback load Jquery */ ?> ....
only if i delete
Code:
if ($loadJSL_jQuery) { echo('<script src="'.$tpath.'/assets/js/libs/jquery-1.8.2.min.js"></script>'); }
the instruction
Code:
if (typeof jQuery == 'undefined') { document.write(unescape("%3Cscript src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js' type='text/javascript'%3E%3C/script%3E")); }
is executed and jquery are loaded from google

Regards

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #31088 by ggppdk
Replied by ggppdk on topic Disable Jquery Global
OK will examine this, again i don't remember why i had not used it,

also i must no forget to update jQuery UI included with FLEXIcontent as they work with jQuery up - to v1.7.x but not with jQuery v1.8.x +


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save