jQuery conflict between Greasemonkey script and page [duplicate]

吃可爱长大的小学妹 提交于 2019-12-22 18:24:04

问题


I'm writing an add-on for Greasemonkey and using jQuery 1.9.1 (via @require).

But there's already jQuery 1.1.2 on the website:

<script type="text/javascript" language="JavaScript" src="jquery.js" >...

When I run the script it says

"TypeError: jQuery.browser is undefined".

I tried adding jQuery migrate to the Greasemonkey script - but it's still not working.

I think I need to replace the old jQuery version with the newest on the website dynamically. Is this possible (BTW. jQuery isn't actually used there a lot)?

来源:https://stackoverflow.com/questions/15171769/jquery-conflict-between-greasemonkey-script-and-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!