我無法用看似簡單的插件功能:https://github.com/kemayo/maphilight不確定是不是在maphilight.js
我試過無數的東西,不斷收到:Uncaught TypeError: undefined is not a function
從我的一個在main.js代碼行。
我正在使用jquery和maphilight的最新穩定版本。
main.html中:
<body>
<img class="img_map" usemap="#regional_map">
<map name="regional_map">
<area ...... />
<area ...... />
</map>
<script src="js/jquery-1.11.1.min.js" type="text/javascript"></script>
<script src="js/jquery.maphilight.js" type="text/html"></script>
<script src="js/main.js" type="text/javascript"></script>
</body>
main.js:
$(".img_map").maphilight();
幫助了我,以及[和也是這個(https://stackoverflow.com/questions/25511903/uncaught-typeerror-undefined-is-not-a-function-jquery-maphilight-js ) – Srso 2017-06-24 06:40:31