0
我開始使用ImageMapster JQuery插件,並且卡住的速度非常快。當我將鼠標懸停在某個區域上時,我希望有一個工具提示,但它不起作用。我使用「id」參數作爲區域鍵,並希望在鼠標指向id =「sam」的區域時顯示工具提示。
這是我的代碼 - 它很簡單,我不知道我做錯了什麼。任何人都可以幫我嗎? ImageMapster本身並不存在問題,因爲它的其他功能可以工作。謝謝ImageMapster - 在鼠標懸停時未顯示工具提示
<img id="mapka" src="../Img/Maps/bigmap.JPG" usemap="#mymap" width="880">
<map id="geo_map" name="mymap">
<area shape="rect" id="sam" coords="135,62,216,167" href="/map/samegrelo">
</map>
<script> $(document).ready(
function() {
$('#mapka').mapster({
singleSelect: true,
fill: true,
mapkey: 'id',
fillOpacity: 0.3,
fillColor: 'ff0000',
clickNavigate: true,
showToolTip: true,
onMouseover: function (e) {
$(this).mapster('set', false).mapster('set', true);
},
onMouseout: function (e) {
$(this).mapster('set', false);
},
areas: [
{
key: "sam",
toolTip: "Don't mess with Texas"
}]
});
})
</script>