With a pointer in the right direction from it seems that the tooltips require a title tag even if you're supplying your own content. The following doesn't work because #dom_tip doesn't have a title attribute:
html:
- <p>I'm going to show you some html content from a hidden div within the dom right <span id="dom_tip" class="highlight">here</span>.
- </p>
- <div class="hide" id="dom_tip_info">
- <p>This tooltip contains html from a dom element div>#dom_tip_info</p>
- </div>
js:
- $('#dom_tip').tooltip({
- content: function() {return $('#dom_tip_info').html();}
- });
It does work with the following:
<span id="dom_tip" class="highlight" title>here</span>Is there a reason why a title attribute has to be present? I've not contributed to the jQuery project before but I'm happy to make a change and push it up, what's the usual resolution (assuming a change is required)?
A jsFiddle with my demo is:
http://jsfiddle.net/i_woody/89E62/5Background: I've been testing the jQuery UI Tooltips to see if I can make use of them in a work project to replace the qTip (v1) tooltips.