gpt4 book ai didi

hide - jQVMap - 工具提示显示隐藏选项

转载 作者:行者123 更新时间:2023-12-02 05:00:38 26 4
gpt4 key购买 nike

我有一个在每个区域显示工具提示的 JQVMap,但在我的 map 中有一些区域我不想显示工具提示 - 请帮忙。提前致谢

最佳答案

它在 jqvmap 文档中有描述:

Consider that fact that you can use standard features of jQuery events like event.preventDefault() or returning false from the callback to prevent default behavior of JQVMap (showing label or changing country color on hover). In the following example, when user moves mouse cursor over Canada label won't be shown and color of country won't be changed. At the same label for Russia will have custom text.

  jQuery('#vmap').vectorMap(
{
onLabelShow: function(event, label, code)
{
if (code == 'ca')
{
event.preventDefault();
}
else if (code == 'ru')
{
label.text('Bears, vodka, balalaika');
}
},
onRegionOver: function(event, code)
{
if (code == 'ca')
{
event.preventDefault();
}
},
});

关于hide - jQVMap - 工具提示显示隐藏选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17146887/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com