解决方法
如果您希望将鼠标悬停在提示中,但仍然希望它在鼠标悬停时关闭,请将固定和延迟选项用作
described in the documentation here:
$('.selector').qtip({ content: { text: 'I hide on mouSEOut,but you can mouse into me within 500ms',},hide: { fixed: true,delay: 500 } });
hide参数有很多选项。例如,如果你不想无限期地隐藏它,只需将hide设置为false即可:
$('.selector').qtip({ content: { text: 'I never hide',hide: false });
如果要将其隐藏在不同的事件上,例如单击提示外的任何位置,请明确地设置事件:
$('.selector').qtip({ content: { text: 'I hide when you click anywhere else on the document',hide: { event: 'unfocus' } });
如果要在触发器被单击时隐藏,请指定click事件:
$('.selector').qtip({ content: { text: 'I hide when you click the tooltip trigger',hide: { event: 'click' } });
具体见the “hide” options documentation了解更多信息。