I want to show some html in popover using http://twitter.github.com/bootstrap/javascript.html#popovers. How compatible is to store text in data-content? Will it work in all browsers?
Asked
Active
Viewed 113 times
1 Answers
1
You can use html in the data attribute, just watch out not to include certain quotation marks. You can use "
in texts of course but need to use single or double quotes depending on the tag's quotes.
The data attribute should work in most browsers: Do HTML5 custom data attributes “work” in IE 6?
<a data-original-title="<em class='tooltip-title'>bar</em>" href="#" rel="tooltip">foo</a>
<a data-original-title='<em class="tooltip-title">bar</em>' href="#" rel="tooltip">foo</a>
It works for tooltips, popovers shouldn't be different.