Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10058 closed bug (notabug)

jQuery tooltip won't show if title not set

Reported by: tasso85 Owned by:
Priority: minor Milestone: none
Component: ui.tooltip Version: 1.10.4
Keywords: Cc:
Blocked by: Blocking:

Description

Even if a tooltip is set on an element by calling

$("element_selector").tooltip({});

it won't show up if the element has no title attribute.

In fact this does not work http://jsfiddle.net/bCN4X/1/, while instead this does http://jsfiddle.net/bCN4X/2/

Change History (3)

comment:1 Changed 6 years ago by Scott González

Resolution: notabug
Status: newclosed

Please read the documentation about changing the content option.

comment:2 Changed 6 years ago by tasso85

I have read it, and perhaps I have understood the problem, in fact this does work http://jsfiddle.net/bCN4X/3/ , but this seems a rather strange behaviour... why would I need to specify twice where I want to see the tooltip?

comment:3 in reply to:  2 Changed 6 years ago by tj.vantoll

Replying to tasso85:

I have read it, and perhaps I have understood the problem, in fact this does work http://jsfiddle.net/bCN4X/3/ , but this seems a rather strange behaviour... why would I need to specify twice where I want to see the tooltip?

Because the tooltip widget also works with delegation—for example $( document ).tooltip({ items: "button" }). If you need further assistance, please use the jQuery forums or Stack Overflow.

Note: See TracTickets for help on using tickets.