开发者

Any way to disable tooltip (title attribute) when right click (contextmenu)?

Using jQuery, I would like the tooltip to work on hover, and con开发者_运维百科text menu to work on right click, but not with the tooltip hovering over my contextmenu. Is this possible?


What about something like this?

Basically, blank the title attribute on context menu initialization, and then reset it on context menu disappearing.


I think you will be lucky to override control of the tooltip display away from Internet Explorer;

However, try this:

  1. Set the title attribute to an empty string on hover, storing the value in a custom attribute.
  2. Then draw the tooltip yourself using javascript/dom manipulation.

Right clicking could then vanquish the tooltip.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜