Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

For example
If you have a plugin on a site that uses jQuery 1.5.x and want to create a new plugin by implementing a script which uses an older version of jQuery, for example 1.3.x or 1.4.x.

I know it probably depends on jQuery functions that are called, but if you really had to use both 1.5 and some older version of jQuery.. how would you deal with this kind of situation? Is it even possible to use 2 different versions of jQuery at the same time without drawbacks?

Thanks.

share|improve this question
3  
It is possible to load multiple versions of jQuery, but you will need to adapt the code that uses it to reference the correct version. If you want this to work with the WordPress wp_enqueue_script functions, you will need to register two different scripts, like jquery and jquery_13. So in theory it is doable, but in practice it will be difficult (which is why I put this in a comment and not an answer). –  Jan Fabry Mar 2 '11 at 10:55
add comment

1 Answer

up vote 1 down vote accepted

You could use jQuery.noConflict in your new plugin.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.