2011-08-30 130 views

回答

47

如果你希望它保持可见,当你鼠标移到提示,但仍然希望它解雇mouseout,使用固定和延时选项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 
    } 
}); 

的隐藏参数有许多选项。例如,如果你只是想掩饰不了它无限期,只需设置隐藏到假:

$('.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

+1

太感谢你了..这对我帮助很大。我只是只发现这一点。 –

5

如果你想尖端保持打开,然后把它隐藏在目标外的用户点击或离开时的目标:

show: { 
    event: 'mouseover' 
}, 

hide: { 
    event: 'click mouseleave' 
} 
相关问题