未捕获的TypeError:未定义不是函数:jquery.maphilight.js [英] Uncaught TypeError: undefined is not a function :jquery.maphilight.js
问题描述
http://midnightshealing.poweredhub.com/roi-scan/
这是我尝试开发的网站.
有一些奇怪的问题.
您可以在控制台窗口中看到.
它说-
http://midnightshealing.poweredhub.com/roi-scan/
This is the site which i am tryin to develop.
there is some wierd problem.
You can see in the console window.
It Says-
"Uncaught TypeError: undefined is not a function"
我知道,通常会出现此错误. IE.在声明函数之前先调用它.
I know, when this error comes generally. ie. calling a function before declaring it.
我先调用jquery.maphilight.js,
然后,
调用AllScripts1.js,我在其中初始化上述插件.
i am calling jquery.maphilight.js first,
and then,
calling AllScripts1.js in which i am initialising the above plugin by.
$(document).ready(function () {
$('img[usemap]').maphilight({ stroke: false, fillColor: '009DDF', fillOpacity: 0.5, alwaysOn: true }); //change default color here
});
我找不到做错了的东西.
任何帮助将不胜感激.
谢谢!
i am not able to find wt i hv done wrong.
any help will be appreciated.
Thanks in advance.
推荐答案
您似乎两次包含jQuery,这可能是错误的原因.
You seem to have included jQuery twice, which is probably the reason for the error.
第一个jQuery在这里:
The first jQuery is here:
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
第二个在这里:
<script type='text/javascript' src='http://midnightshealing.poweredhub.com/wp-includes/js/jquery/jquery.js?ver=1.11.0'></script>
您需要摆脱其中任何一个,以解决此问题.
You need to get rid of either one of them in order to fix the issue.
这篇关于未捕获的TypeError:未定义不是函数:jquery.maphilight.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!