jQuery .Noconflict问题

0 javascript jquery

我有一个问题,我无法解决,它让我疯了.我正在使用jQuery库,我正在使用".noconflict".

我试图在我的博客上使用以下脚本 -

http://www.internetmarketingmonitor.org/word-press-plugins/imm-glossary-wordpress-plugin

问题是 - 我一直收到以下错误 -

>  [Exception... "Component returned failure code: 0x80070057
> (NS_ERROR_ILLEGAL_VALUE) [nsIDOMXPathEvaluator.evaluate]"  nsresult:
> "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame ::http://myblog.com/wp-content/plugins/IMM-Glossary/JavaScripts/prototype.js
> :: anonymous :: line 1081"  data: no]
> Source:http://myblog.com/wp-content/plugins/IMM-Glossary/JavaScripts/prototype.js
Run Code Online (Sandbox Code Playgroud)

什么没有意义的是正在使用.NOCONFLICT? - 只需下载此插件并将*.js放在与jquery相同的页面上即可轻松复制错误?

有人能帮忙吗?

Bri*_*air 5

我查看了源代码,但是现在看不到页面上的jQuery.

根据您对原始问题的评论,听起来您并没有积极地启动noConflict功能.你需要做一些类似于此的事情.

<script type="text/javascript" src="path/to/jquery.js"></script>
<script type="text/javascript">
    jQuery.noConflict();
</script>
Run Code Online (Sandbox Code Playgroud)

你会注意到对jQuery.noConflict的调用没有包含在任何类型的DOM就绪检查中.您希望在包含jQuery之后立即运行它以确保安全.