我正在使用 qTip:http://craigsworks.com/projects/qtip2我目前的问题是,当我悬停工具提示时,它会消失(因为目标是 mouseleave/mouseout)。
有没有办法让它在我悬停工具提示时保持可见?我将工具提示定位在目标下方,这样目标和工具提示之间的空白空间为零。
最佳答案
使用固定
:http://craigsworks.com/projects/qtip2/docs/hide/#fixed
您可能希望在工具提示消失之前添加一个延迟
,以防您的触发元素和工具提示之间存在一定距离。
例如
$('.moreinfo').qtip({
content: {
text: $('<p>This is a tooltip.</p>')
},
show: {
effect: function() { $(this).fadeIn(250); }
},
hide: {
delay: 200,
fixed: true, // <--- add this
effect: function() { $(this).fadeOut(250); }
},
style: {
classes: 'ui-tooltip-blue ui-tooltip-shadow ui-tooltip-rounded'
}
});
希望对您有所帮助。
关于javascript - 悬停工具提示时使qTip不消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9019275/