使用JQueryUI一次打开许多工具提示 [英] Open many tooltips at once with JQueryUI
问题描述
我需要做类似的事情:
$(document).tooltip("open");
之所以需要执行此操作,是因为我希望在鼠标悬停时显示工具提示,同时还要有一个显示所有提示的复选框.
这有可能吗?
您可以在jsFiddle中检查我想要的内容: http://jsfiddle.net/3e5QP/ >
它可以正常工作,但是您的示例存在一些问题.
首先,您的复选框应为showAll
,而其ID为#showAll
.
第二,根据jQuery API,工具提示打开方法仅适用于未授权的元素.
以编程方式打开工具提示.这仅旨在被称为 用于未授权的工具提示.
因此,不要将工具提示绑定到文档,而是将其绑定到锚点.
这里的一个的 的jsfiddle例如 强>其示出了当复选框被选中的所有的提示.> I need to do something like: I need to do this because of I want display the tooltip on mouseover but also with a checkbox showing all of them. Is this even possible? You can check what I want in jsFiddle: http://jsfiddle.net/3e5QP/ It works fine but you have a few issues with your example. First, your checkbox has an id of Second, according to the jQuery API, the tooltip open method only works on non-delegated elements. Programmatically open a tooltip. This is only intended to be called
for non-delegated tooltips. So instead of binding the tooltips to the document, bind them to your anchors. Here's a jsFiddle example that shows all the tooltips when the checkbox is checked. 这篇关于使用JQueryUI一次打开许多工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!$(document).tooltip("open");
#showAll
when it should be simply showAll
.