Open many tooltips at once with JQueryUI
Asked Answered
O

1

2

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/

Orangeade answered 14/2, 2013 at 15:48 Comment(2)
Maybe. You'll need to post the rest of the relevant code and if possible, create a jsFiddle.Spiny
Ok, here is it: jsfiddle.net/3e5QPOrangeade
S
5

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.

Spiny answered 14/2, 2013 at 17:53 Comment(1)
Right, I've just misspelled the id. Thanks a lotOrangeade

© 2022 - 2024 — McMap. All rights reserved.