javascript - jQuery conflict between two libraries -
i faced confuing problem on website.
i using 2 jquery libraries 1 1.5.1 , other 3.2.1. latest version of jquery using noconflict mode
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> var inst = jquery.noconflict(); </script>
everything ok, when customer choosing shiping method on website shows error , other scripts doesnt work.
but jquery library 3.2.1 should in noconflict mode. , there no conflicts , errors on other pages of website.
i dont know how can fix issue.
thanks
jquery .live() has been removed in version 1.9 onwards.
so must change:
.live(events, function)
should map to:
.on(eventtype, selector, function)
below reference links:
the page live()
shows how convert on()
:
updated:
you can free jquery noconflict(true)
. though, if take route, you'll want alias neither $
nor jquery
:
var jq = jquery.noconflict(true);
or may can this:
var jq = $.noconflict();
then can call jquery function jq
.
jq('#selector');
Comments
Post a Comment