Search code examples
jqueryjquery-uitooltip

jQuery tooltip won't show on button


I am currently trying out the jQuery UI Tooltip plugin using jQuery v1.7.2 and jQuery UI v1.10.4

I've reproduced a barebone setup of the problem I am facing here: http://jsfiddle.net/bCN4X/1/

What I would want to obtain is that the table inside the hidden div is used as the button tooltip, and it should also be shown/hidden on click on the button.

I have tried binding some log function on the create, open and close events for the tooltip, however, while it seems that it is correctly created, it never shows up, not on hover nor on clicking.

I have already used the plugin, on some thumbnail images to show the full image, and that worked flawlessly, this should be a simple setup and yet I can't have it work properly.

How can I then make it work as intended? Do I need to change some of the options?


Solution

  • I had just posted the question and, fiddling around, I found the problem, so I am answering my own question for future reference, should any of you encounter the same problem.

    The error was caused by the fact that the element had no title attribute, and this caused the tooltip not to trigger; adding a title to the button solved the problem.

    I have updated my setup and now works correctly: http://jsfiddle.net/bCN4X/2/

    It looks like a bug to me, so I am going to report it to jQuery UI developers.