问题
Recently I'm facing problem with Bootstrap 3 Tooltip when I'm trying to add some html code inside title attribute. It shows me plain html tags code.
Here is the problem
回答1:
For getting html formatted result on tooltip you have to use html: true when initialize the bootstrap tooltip
Example: $('[data-toggle="tooltip"]').tooltip({ html: true });
回答2:
Yep. Depending on how you use it, you have to specify the html
option as true
. Read the docs here.
来源:https://stackoverflow.com/questions/43285259/is-there-any-way-to-support-html-tags-code-inside-bootstrap-tooltip