0

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?

good_evening
  • 21,085
  • 65
  • 193
  • 298

1 Answers1

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.

Community
  • 1
  • 1
kapex
  • 28,903
  • 6
  • 107
  • 121