Affichage des articles dont le libellé est Re: jQuery double loading kerfuffles: how to kill?. Afficher tous les articles
Affichage des articles dont le libellé est Re: jQuery double loading kerfuffles: how to kill?. Afficher tous les articles

Re: jQuery double loading kerfuffles: how to kill?

vendredi 9 janvier 2015

Hey here's a plan. At the cost of a minor performance hit I could add (yet another) custom theme setting on the Current Theme page, to disable my loading of jQ via admin setting if there is a conflict. That would be simple enough to use, and if the mod...



Re: jQuery double loading kerfuffles: how to kill?

Re: jQuery double loading kerfuffles: how to kill?

Exactly the situation I encountered with the gallery where I needed a more recent version of jQuery than the theme had bundled >_<



Re: jQuery double loading kerfuffles: how to kill?

Re: jQuery double loading kerfuffles: how to kill?

Ah, I get it. Has to be put into the rendered html. Erk. Maybe I should stick to grumbling at mod authors. :D The thing is I can't trust them to always call up to date versions of jQ, so I'd rather do it myself.



Re: jQuery double loading kerfuffles: how to kill?

Re: jQuery double loading kerfuffles: how to kill?

Ok, so at a glance I assume that is checking for jQ coming from elsewhere, and if not coming from elsewhere writing the script tag into <head>. So presumably this would have to be inserted into <head> after the calls for headers from mods, yes?



...



Re: jQuery double loading kerfuffles: how to kill?

Re: jQuery double loading kerfuffles: how to kill?

Can't really be done in PHP without a LOT of fuss.



I was doing it in the templates with:

[code]window.jQuery || document.write(\'<script type="text/javascript" src="' . $settings['default_theme_url'] . '/scripts/jquery-1.11.0.min.js"><\/script>\');[/co...



Re: jQuery double loading kerfuffles: how to kill?
 

Lorem

Ipsum

Dolor