4 Jun 2013

Add line break within tooltips

Just use the entity code 
 for a line break in a title attribute.
---------------------------------------------------------------------------------------
Well if you are using Jquery Tooltip utility, then in "jquery-ui.js" Javascript file find following text:
tooltip.find(".ui-tooltip-content").html(content);
and put above that
content=content.replace(/\&lt;/g,'<').replace(/\&gt;/g,'>');
I hope this will also work for you.
---------------------------------------------------------------------------------------
&lt;br /&gt; did work if you are using qTip
 --------------------------------------------------------------------------------------- 
it is possible to add linebreaks within native HTML tooltips by simply having the title attribute spread over mutliple lines.
However, I'd recommend using a jQuery tooltip plugin such as Q-Tip:http://craigsworks.com/projects/qtip/.
It is simple to set up and use. Alternatively there are a lot of free javascript tooltip plugins around too.
edit: correction on first statement.