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
  • 20,557
  • 64
  • 184
  • 294

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
  • 27,631
  • 6
  • 104
  • 117