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.

enter image description here

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:

http://api.jquery.com/on/

http://api.jquery.com/off/

the page live() shows how convert on():

http://api.jquery.com/live/

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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -