I followed the official document's instructions at:
http://iamceege.github.io/tooltipster/#htmlcontentalt
Everything worked fine. The only extra thing that I added wa an 'a' tag inside the content as follows:
Here is the html code:
<a class="tooltip-container">
This div has a tooltip with HTML when you hover over it!
<span class="tooltip_content">
<a href="#"></a><img src="myimage.png" /> <strong>This is the content of my tooltip!</strong>
</span>
</a>
Here is the JavaScript code:
$('.tooltip-container').tooltipster({
functionInit: function (instance, helper) {
var content = $(helper.origin).find('.tooltip_content').detach();
instance.content(content);
}
});
Here is the JSFiddle:
https://jsfiddle.net/c3ddf8bm/7/
Unfortunately the tooltip shows nothing!
Note: I tested it in up-to-date versions of Chrome and IE.
Update:
Following xorspark and Josh Whitlow's fiddles, I realized that this issue only happens when the main "tooltip-container" is a hyperlink itself. I think it makes sense to define it as a hyperlink or another tag that the client can focus on it using keyboard, otherwise I think it will have accessibility issues.