如何使工具提示停留,以便可以单击其中的链接

编程入门 行业动态 更新时间:2024-10-23 15:21:39
本文介绍了如何使工具提示停留,以便可以单击其中的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有jQuery插件Tooltipsy,可为链接生成工具提示.在此工具提示中,我还有其他指向相关对象的链接.我希望它在初始链接的上方弹出并停留,如果我将鼠标移到该链接上以单击该链接,则停留在该位置.这可能吗?有人知道怎么做吗?

I have the jQuery plugin Tooltipsy to generate a tooltip for a link. In this tooltip I have other links to related objects. I would like it to pop up just above the initial link and stay if I move the mouse to it to click a link. Is this possible? Does anyone know how to do it?

推荐答案

我没有让它保持打开状态,迫不及待,所以我改用另一个名为简单提示,它提供了我所需的功能.

I didn't manage to get it to stay open and couldn't wait any longer so I changed to another tooltip plugin called simpletip that provided the functionality that I needed.

Simpletip本身无法从链接中获取title属性,因此这是我用来实现此目的的代码.我将代码更改为采用数据标题(符合HTML5的标准)代替标题,因此不必从默认显示中阻止所有标题:

Simpletip could not get the title attribute from the links by itself so this is the code I used to achieve that. I changed the code to take data-title (HTML5 compliant) instead for title so that I didn't have to block all titles from default showing:

$(".order_tooltip").simpletip({ fixed: true, position: 'top', onBeforeShow: function(){ this.update(this.getParent().data('title')); } });

更多推荐

如何使工具提示停留,以便可以单击其中的链接

本文发布于:2023-10-04 06:00:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1467128.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单击   提示   链接   工具

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!