0

How can I use another version of jQuery on the same page on website without conflicts? This is the situation:

<!-- code with loaded jquery-2.2.0.min.js -->
<div id="gallery"></div>

I need to use jQuery 1.3.0 just for this gallery div, so the best if it'd work like this:

<!-- code with jquery-2.2.0.min.js -->
<div id="gallery">
  <!-- load jquery-1.3.0.min.js just on this div -->
</div>
<!-- load jquery-2.2.min.js again to the rest of the site -->

I don't know JS nor jQuery, nor how it works, that's why I ask you guys. I can even put full jquery-1.3.0.min.js code on the page somehow, I just need this to work without conflict with jQuery 2.2.0. I also need jQuery 2.2.0 on this page as well. I need any working solution.

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
  • 2
    The best is to use latest one only .... – Jack jdeoel Jul 03 '18 at 10:27
  • I would say it's impossible unless a jQuery Guru say it is .... – Temani Afif Jul 03 '18 at 10:31
  • It's possible (see the duplicate I marked for examples) but it's a big headache that's really best avoided. I'd strongly suggest you use a single version of jQuery which you update globally. If jQuery 2.2.0 has issues for you, why use it? I presume it's an IE-related problem as that was the major change to the 2.x branch – Rory McCrossan Jul 03 '18 at 10:35

0 Answers0