imageMapster在悬停时不显示alt img

时间:2015-03-31 06:22:06

标签: jquery

这就是我所拥有的。我按照imagemapster绝对的初学者教程,仍然无法让它在悬停或点击时交换其他图像。它显示了它的一个链接,并且光标在悬停时发生变化。

<script src="script/jquery-2.1.0.min.js"></script>
<script src="script/jquery.imagemapster.js"></script>

<div id="knollnav">
<img id="knollnav_img" src="GFX/knollingbw.jpg"  usemap="#knoll" />
<map name="knoll">
<area student="tiff" href="#" shape="poly" coords="390,29,394,215,643,208,635,22,390,29" />
<area student="jennica" href="#" shape="poly" coords="690,29,702,156,976,145,965,27,690,29" />
<area student="matt" href="#" shape="poly" coords="917,187,917,277,985,279,986,190,917,187" />
<area student="jess" href="#" shape="poly" coords="728,209,730,335,867,326,853,193,728,209" />
<area student="cody" href="#" shape="poly" coords="929,332,922,397,943,450,949,667,983,667,976,449,991,403,987,349,966,317,929,332" />
<area student="brando" href="#" shape="poly" coords="780,371,798,473,889,461,868,356,780,371" />
<area student="ben" href="#" shape="poly" coords="816,503,820,612,912,616,920,505,816,503" />
<area student="kayla" href="#" shape="poly" coords="582,374,588,650,766,656,766,443,706,371,582,374" />
<area student="karina" href="#" shape="poly" coords="438,404,443,658,527,653,521,405,438,404" />
<area student="brittney" href="#" shape="poly" coords="356,338,360,623,188,621,189,351,356,338" />
<area student="brady" href="#" shape="poly" coords="103,424,113,616,27,630,37,426,103,424" />
<area student="pat" href="#" shape="poly" coords="405,263,410,366,673,345,663,251,405,263" />
<area student="erik" href="#" shape="poly" coords="171,24,169,251,308,246,323,29,171,24" />
<area student="luc" href="#" shape="poly" coords="107,33,104,338,50,331,46,45,107,33" />
</map>
</div>


<script>
$(document).ready(function ()
{
$('#knollnav_img').mapster({
singleSelect : true,
render_highlight : { altImage : 'GFX/knolling.jpg' },
 mapKey: 'student',
fill : true, altImage : 'GFX/knolling.jpg',
fillOpacity : 1,
});
});
</script>

抱歉新手问题,我还在学习:) 谢谢!

1 个答案:

答案 0 :(得分:0)

问题的原因是jquery的版本。我们不得不使用旧版本。