Skip to main content

Search and Top Navigation

#10058 closed bug (notabug)

Opened May 22, 2014 10:40AM UTC

Closed May 22, 2014 12:24PM UTC

Last modified May 23, 2014 12:24PM UTC

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/

Attachments (0)
Change History (3)

Changed May 22, 2014 12:24PM UTC by scottgonzalez comment:1

resolution: → notabug
status: newclosed

Please read the documentation about changing the content option.

Changed May 23, 2014 11:51AM UTC by tasso85 comment:2

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?

Changed May 23, 2014 12:24PM UTC by tj.vantoll comment:3

Replying to [comment:2 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.