我正在使用jquery API来显示工具提示。我想将鼠标悬停在表格图像上的图形旁边的工具提示放置在图像附近,并且当我将鼠标悬停在图像上时,以前的工具提示仍然是 ,我可以在鼠标从图像移开后立即淡出工具提示。请找到小提琴:http://jsfiddle.net/0w9yo8x6/4/ 下面的代码片段:鼠标移出后立即提示定位和隐藏工具提示
$(function() {
$(document).tooltip({
content: function() {
return $(this).prop('title');
},
show: null,
close: function (event, ui) {
ui.tooltip.hover(
function() {
$(this).stop(true).fadeTo(400, 1);
},
function() {
$(this).fadeOut("400", function() {
$(this).remove();
})
});
}
});
});
$(function() {
$('.one').attr('title', $('.tooltipTable').remove().html());
$(document).tooltip();
});
$(function() {
$('.one').attr('title', $('.tooltipTable').remove().html());
$(document).tooltip();
});
也许看到:http://stackoverflow.com/questions/13057606/jquery-ui-tooltip-manual-open-close – 2014-11-20 21:04:32