Disable Jquery Global

More
11 years 5 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
11 years 5 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...

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

More
11 years 5 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
11 years 5 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...

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

More
11 years 5 months ago #31098 by Rehne
Replied by Rehne on topic Disable Jquery Global

ggppdk wrote: OK will examine this, again i don't remember why i had not used it....

i know somehow :D

by the way
i think? it would be the easiest
to offered a button to disable jquery in the global FC Config and provide the user the important note that he should only disable this if he load jqeury within its joomla templates and that jqeury 1.7+ is required for FC ????

Regards

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.272 seconds
Save
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