【问题标题】:ImageMapster - tooltips not showing on mouseoverImageMapster - 鼠标悬停时不显示工具提示
【发布时间】:2015-12-18 16:46:22
【问题描述】:



我开始使用 ImageMapster JQuery 插件并很快陷入困境。当我将鼠标悬停在某个区域上时,我希望显示一个工具提示,但它不起作用。我使用“id”参数作为区域键,并希望在将鼠标指向 id=“sam”的区域时显示工具提示。
这是我的代码 - 它非常简单,我不知道我做错了什么。有人可以帮我吗?问题不在于 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>

【问题讨论】:

    标签: jquery imagemap imagemapster


    【解决方案1】:

    终于找到问题所在了。我在函数中使用“mapkey”而不是“mapKey”,它似乎区分大小写。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-04-07
      • 2011-04-22
      • 2011-09-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多