我正在开发一个Web应用程序,其中用户具有一些点的地图。当用户将鼠标悬停在一个工具提示上时,将显示一个工具提示。我试图用jQuery插件imageMapster解决这个问题。除了toolTip之外的所有东西都在工作。
HTML:
<img src="img/oberland.jpg" usemap="#map-oberland" id="oberland">
<map name="map-oberland">
<area target="" alt="Number 1" id="t1" title="Number 1" href="" coords="637,493,11" shape="circle">
<area target="" alt="Number 2" id="t2" title="Number 2" href="" coords="683,407,12" shape="circle">
<area target="" alt="Number 3" id="t3" title="Number 3" href="" coords="742,356,11" shape="circle">
<area target="" alt="Number 4" id="t4" title="Number 4" href="" coords="540,145,10" shape="circle">
<area target="" alt="Number 5" id="t5" title="Number 5" href="" coords="703,130,10" shape="circle">
</map>
jQuery:
$(document).ready(function () {
$('#oberland').mapster({
fillOpacity: 0.4,
fillColor: "d42e16",
stroke: true,
strokeColor: "3320FF",
strokeOpacity: 0.8,
strokeWidth: 4,
singleSelect: true,
mapKey: 'id',
listKey: 'id',
showToolTip: true,
toolTipClose: ["tooltip-click", "area-click"],
areas: [
{
key: "t1",
toolTip: "Tour1"
},
{
key: "t2",
toolTip: "Tour1"
},
{
key: "t3",
toolTip: "Tour1"
},
{
key: "t4",
toolTip: "Tour1"
},
{
key: "t5",
toolTip: "Tour1"
}]
})
});
有什么建议吗?