0
我使用圖像映射器來映射圖像。當區域的一部分被粘連時,另一個映射圖像come.so我使用許多圖像和每個圖像我需要重複mapster屬性。我嘗試某種方式,但然後onclick函數和tooltip不工作。有我的兩個圖像的jquery '圖像mapster屬性重複
$('#man').mapster({
fillOpacity: 0.5,
mapKey: 'alt',
fillColor: "000000",
listKey: 'alt',
scaleMap: false,
stroke: true,
singleSelect: true,
toolTipClose: ["tooltip-click", "area-click", "area-mouseout"],
showToolTip: true,
onClick: function (e) {
if (e.key === 'leg') {
$('#MaleLegDIV').show();
$('#DefaultMaleDIV').hide();
}
},
areas: [
{
key: "leg",
toolTip: 'LEG'
}
]
});
$('#manLeg').mapster({
fillOpacity: 0.5,
mapKey: 'alt',
fillColor: "000000",
listKey: 'alt',
scaleMap: false,
stroke: true,
strokeColor: "3320FF",
singleSelect: true,
toolTipClose: ["tooltip-click", "area-click", "area-mouseout"],
showToolTip: true,
areas: [
{
key: "toes",
toolTip: 'TOES'
},
]
});
});
</script>`
因爲你看到mapster屬性重複每個圖像。所以有什麼辦法,我只是導入屬性。因此許多行不需要寫入。任何幫助都很感謝,並提前感謝。