如何暂停显示工具提示的标题属性? [英] How to stop title attribute from displaying tooltip temporarily?

查看:84
本文介绍了如何暂停显示工具提示的标题属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在rightclick上显示了一个弹出式div(我知道这打破了预期的功能,但Google Docs是这么做的,为什么不呢?)然而,我显示弹出窗口的元素有一个title属性集,我的分区的顶部。

I've got a popup div showing on rightclick (I know this breaks expected functionality but Google Docs does it so why not?) However the element I'm showing my popup on has a "title" attribute set which appears over the top of my div. I still want the tooltip to work but not when the popup is there.

当弹出窗口打开/打开时,停止显示工具提示的最佳方式是什么?

What's the best way to stop the tooltip showing while the popup is open/openning?

编辑:我正在使用jQuery

I am using jQuery

推荐答案

With jquery 你可以绑定悬停功能,也可以将title属性设置为空onmouseover,然后在鼠标移出时将其重置。

With jquery you could bind the hover function to also set the title attribute to blank onmouseover and then reset it on mouse out.

$("element#id").hover(
 function() {
  $(this).attr("title","");
  $("div#popout").show();
 },
 function() {
  $("div#popout").hide();
  $(this).attr("title",originalTitle);
 }
);

这篇关于如何暂停显示工具提示的标题属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆