I have two sets of templates running on my site. I’m trying to migrate over to one template, but this has to be done in stages. The templates use two different versions of jquery. How do I select the correct jqery version when adding my accordian to the page?
Have you tried accordion with the two versions of jQuery that you have? If it works with both then you could use either version of jQuery, although arguably it would be better to use the later version of the two.
I think following jQuery’s recommendation is best, but if you must there is a way
https://api.jquery.com/jquery.noconflict/
f for some reason two versions of jQuery are loaded (which is not recommended), calling $.noConflict( true ) from the second version will return the globally scoped jQuery variables to those of the first version.
.
if you need to use multiple versions of the jQuery library on the same page), you need to consider that most plug-ins rely on the presence of the jQuery variable and may not operate correctly in this situation.
.
Load two versions of jQuery (not recommended). Then, restore jQuery’s globally scoped variables to the first loaded jQuery.
It appears I only have one version installed. I downloaded the new version and copied it into my JS file, but the template isn’t recognizing it.
I don’t understand where I need to put this code.
If it’s the same accordion.js I have used, I believe it is no longer supported and it requires an old version of jQuery.
As it happens, I have just replaced an accordion menu with jQuery 1.2.3b with a pure CSS menu on one of my sites.
Than don’t bother trying.
There’s no guarantee it would work without bugs
It’s why jQuery itself recommends it not be done.,
IMHO it isn’t worth the time and effort to try it if doing so is non-trivial to you.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.