Opened 7 years ago

Closed 7 years ago

#8894 closed bug (notabug)

Tooltip: Title attribute is required before content option will display value

Reported by: whatstherush Owned by:
Priority: minor Milestone: 1.10.0
Component: ui.tooltip Version: 1.9.2
Keywords: Cc:
Blocked by: Blocking:

Description

When you want to provide dynamic content to the tooltip using the content option, it won't display that content unless the targeted html element has a title attribute.

Here is a JFiddle example http://jsfiddle.net/jWat4/3/

If this is by design, the use case I would put forward for it not being required would be if you are using the tooltip to display server generated validation messages.

So in the current situation you would have to decorate each possible element that could generate one of these validation messages with the title attr (I know this could be easily done progromatically), but it just seems counter intuitive, when the content option wouldn't do this automatically or work with out the title attr being required in first place.

Change History (1)

comment:1 Changed 7 years ago by Jörn Zaefferer

Resolution: notabug
Status: newclosed

You need to change both the content and items option. See http://api.jqueryui.com/tooltip/ - "The items and content options need to stay in-sync. If you change one of them, you need to change the other."

See http://jsfiddle.net/4B2VY/1/

Note: See TracTickets for help on using tickets.