How can focus on a qTip?
I just started trying out qTip for popup type work. I was wondering if u can set the qTip to focus when you scroll your mouse onto it. An application would be let's say if you wanted to copy and paste开发者_运维知识库 the text that popped up in a qTip, how would you be able to allow the qTip to disappear only after your mouse is off the qTip and the a href that spawns the qTip?
Thanks
To do that you need to set the fixed
value to true and set the when
value to inactive:
$("#target").qtip({
...
hide: {
fixed: true,
when: { event: 'inactive' },
delay: 2000
}
...
});
The fixed value if set to true will not hide the tooltip if moused over, allowing the contents to be clicked. The inactive event will fire and hide the tooltip after 2 seconds of no interaction. You can play around with the timing, but that is one way to achieve what you want.
精彩评论