Search code examples
jquery-uijquery-ui-tooltip

Open many tooltips at once with JQueryUI


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/


Solution

  • 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.