如何删除默认工具提示并保留我自己的工具提示的内容

How to remove the default tooltip and keep my own tooltip's content

本文关键字:工具提示 我自己 保留 自己的 删除 默认 何删除      更新时间:2023-09-26

我已经用jQuery做了一个工具提示,但默认浏览器仍然存在。我用这个脚本把它弄走了,但它也使我自己的工具提示的内容消失了,这是页面上一些图像的标题:

$('#imagerow img').hover(
function () {
 $(this).data('tooltipText', $(this).attr('title'));
    $(this).removeAttr('title');
},
function () {
    $(this).attr('title', $(this).data('title'));
    $(this).attr('title', $(this).data('tooltipText'));
});

单击 #imagerow 中的较小图像以查看。以下是正在进行的页面的链接:

http://www.beijerland.website/gallerij.html

有人可以帮助我取回自己的工具提示内容吗?(不显示默认工具提示)非常感谢

$('#imagerow img').hover(
function () {
 $(this).attr('data-tooltipText', $(this).attr('title'));
 $(this).removeAttr('title');
},
function () {
    $(this).attr('title', $(this).attr('data-tooltipText'));
});