简体   繁体   中英

How to remove a js file from one page before it load completely

I am facing a problem with my javascript include . The app is already developed using some old version of jquery. Now I am using some new version of jquery files that is making some problem . The error when I am including new file is this.

Uncaught TypeError: Object [object Object] has no method 'datepicker' 

I tried the noCOnflict solution . But it didn't work for me .

Found that if I remove the new .js file then rest of my php files are working perfectly. But new page is throwing some error.Both are depend .

So I thought of removing the js file based on url which I am rendering . Is it possible ? Because I tried but it is not removing.

Thanks in advance

datepicker is not part of jQuery, but part of jQuery UI. I bet if you include jQuery UI, that error and other errors will go away.

http://jqueryui.com/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM