有誰知道如何讓groupBy
函數在maphighlight插件中工作?我希望能夠在地圖上擁有一組國家,無論您在鼠標懸停的組中的哪個國家/地區都能夠突出顯示。我連一個人都無法工作。我能找到的文檔非常稀少。groupBy功能在maphilight jquery插件
我加入以下的國家集團中的每個地圖區域我想組:
href="#" class="no-hand centralasia" alt="Russia" data-maphilight='{"groupBy":".centralasia"}' onmouseover="MM_showHideLayers('Russia','','show')" onmouseout="MM_showHideLayers('Russia','','hide')">
我不知道這一點:
data-maphilight='{"groupBy":".centralasia"}'
我只使用頭部的默認值,因爲我不知道我應該在那裏添加什麼,如果有的話。我也加載了元數據插件。
<script>$(function() {
$('.map').maphilight({fade: false});
});
$.fn.maphilight.defaults = {
fill: true,
fillColor: '000000',
fillOpacity: 0.3,
stroke: false,
strokeColor: 'E77200',
strokeOpacity: 1,
strokeWidth: 1,
fade: true,
alwaysOn: false,
neverOn: false,
groupBy: ("philippines",true)
}
</script>
所有的幫助是非常感謝,因爲我真的需要儘快得到這個工作。
歡呼每一個人。
戴夫
請批准了答案。如果它解決了你的問題。 :) –