我正在尝试使用 jQuery Tool 提示功能,并且从示例中我在更改我所追求的功能的代码时遇到了问题。
http://jqueryui.com/tooltip/#forms
我有几个彩色圆形区域地图,我希望在单击其中一个时弹出工具提示。
以下功能有效,但在将鼠标悬停在元素上时也会弹出工具提示。然后,当您单击它时,会弹出另一个工具提示。
所以我需要的是将功能更改为仅弹出“点击”,然后在几秒钟后消失。
jQuery:
$(function() {
var tooltips = $( "[title]" ).tooltip();
$( "#01-001" ).click(function() {
tooltips.tooltip( "open" );
})
});
HTML:
<area id="01-001" shape="circle" coords="99,71,10" href="#" alt="01-001" data-maphilight='{"stroke":false,"fillColor":"FF0000","fillOpacity":1,"alwaysOn":true}' title="Tool Tip Messgae." />
多谢你们。
塞缪尔