Open many tooltips at once with JQueryUI

拜拜、爱过 提交于 2019-12-02 04:49:58

问题


I need to do something like:

$(document).tooltip("open");

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/


回答1:


It works fine but you have a few issues with your example.

First, your checkbox has an id of #showAll when it should be simply showAll.

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.



来源:https://stackoverflow.com/questions/14878655/open-many-tooltips-at-once-with-jqueryui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!