Are you enjoying the extensions? Did you like the support? Help others decide.

Leave a review

question-circle Added double slash forbids loading jQuery

More
11 years 1 month ago #1992 by lliseil
Hi, thank you for the super neat documentation and forum on top of jQuery Easy and your other extensions!

Here are the first results I got after setting jQuery Easy up. They're a bit off my understanding atm.
The setup:
- Joomla! 2.5.9
- Mootools: yes
- jQuery: two versions loaded; v1.7.1 from the template (end of the page followed by noConflit()), and 1.6.4 from a module (in the page's head)
Firebug's console shows typical error:
TypeError: jQuery(...).data(...).chosen is not a function
[Stopper sur une erreur] 	
jQuery('.inputboxsmart').data("placeholder","Select Frameworks...").chosen();

Here comes jQuery Easy!

As a note Cache is deactivated during tests.
1) First tried with default settings, jquery-1.7.1-min local version; No Conflict Code "Thru script"; Plugin is N. 6th in order.
Browser says "Looking for host {plugins,templates}" for seconds then loads page without jQuery; source shows a slash was added to the scripts' path:
"//templates/mytemplate/js/jquery-1.7.1.min.js"
"//plugins/system/jqueryeasy/jquerynoconflict.js"
Other than that jquery is loaded only once (but in the HEAD)

- attempted the same jQuery version but from Google:
Same thing with the path (strange to me):
"//plugins/system/jqueryeasy/jquerynoconflict.js"

- attempted with No Conflict Code "Thru script declaration" and local / Google version of jQuery, 6th / 30th in plugins order
no more luck for the jQuery stuff. source shows:
<script src="/jQuery.noConflict();" type="text/javascript"></script>

Some guidance would be much appreciated (of course I understand you have to work elsewhere, no problem I'll wait ;))

PS: I would like very much to keep the JS defered on the bottom of the page, like this template does.

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

More
11 years 1 month ago #1994 by admin
Hello,
first, thanks for the kind words, I do appreciate it.
You are getting rather strange behavior on your site, especially with the 'jQuery.noConflict' code in the script tag. Never seen that!
I would need to see the website's source code to understand what is going on here.
As far as the code at the bottom of the page is concerned, you are out of luck here. The jQuery Easy Plugin uses the Joomla! API, which allows code to the <head> element of the page only. I know about this 'trick' but you just cannot do it with Joomla!. All Joomla! extensions are loaded in <head>, no way around it.

Olivier.
The following user(s) said Thank You: lliseil

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

More
11 years 1 month ago #1995 by lliseil
Replied by lliseil on topic Re: Added double slash forbids loading jQuery
Hey, woow! that is a fast answer!

web.lliseil.fr is the web site where I can activate jQuery Easy if/when you like.

ps as for the previous appreciation of the neat job they're simply the truth, at least what I can see. Plus, it fits nicely with your site's name :)

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

More
11 years 1 month ago #1996 by admin
The first solution you have tried (jQuery Easy enabled, jQuery using jQuery locally and no conflict thru script) should be the one to use I believe. What I do not understand is why you are getting double //.
Trying to understand what is going on here...

Olivier.

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

More
11 years 1 month ago - 11 years 1 month ago #1997 by lliseil
Replied by lliseil on topic Re: Added double slash forbids loading jQuery
Alright, it's kindof interesting then!

I activated jQuery Easy on web.lliseil.fr/communication-internet in case you pass by and can have a look.

Again, thank you for the super fast reaction :cheer:

EDIT: Uh, looks like a previous post that I missed before: www.simplifyyourweb.com/index.php/forum/...-leading-slash-added
Last edit: 11 years 1 month ago by lliseil.

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

More
11 years 1 month ago #1998 by admin
Thank you for activating the plugin in one of your pages AND adding the report :-)
It actually helped a lot and I have a 'hunch' on what is happening.
The report shows the right paths for both the jQuery library AND the call to noconflict.js. Which means (I won't go into too many details), it does not replace the src tag correctly.
What version of Joomla! are you using? I am working on the fix and would like for you to try it out. Send me an email at [email protected] so I can send you the file directly.

Olivier.
The following user(s) said Thank You: lliseil

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