Codementor Events

jQuery conflict

Published May 31, 2018

While working on one project, I was showing image gallary using jquery plugin. And then I have to show menu on same page which was again using jQuery but newer version of jQuery.
Image gallary was using older version of jQuery. So i have left with no choice but to use 2 different version of jQuery in my page.But as you may know it was not working due to conflicts in both jQuery files.
After some research found out $.noConflict(); with which I can simply call both the jQuery functions without any conflict.
For image gallary jQuery I used
imgGallary = jQuery.noConflict(true);
and then use imgGallary instead of $ or jquery.

Discover and read more posts from vishal
get started
post commentsBe the first to share your opinion
Show more replies