【发布时间】:2017-12-28 18:01:54
【问题描述】:
我想在弹出框的内容旁边包含一个字形图标,它将在 jquery 中动态完成。 但是当我为 glyphicon 添加 span 标签时,它会在显示弹出框时显示 html 字符串。它不会将其转换为 html
$(this).attr("data-content", "<span class=\"glyphicon glyphicon-warning-sign\" aria-hidden=\"true\"></span>You can't unlist if you have upcoming events scheduled" );
内容最终在弹出窗口中看起来像这样
"<span class=\"glyphicon glyphicon-warning-sign\" aria-hidden=\"true\"></span>You can't unlist if you have upcoming events scheduled"
【问题讨论】:
标签: jquery html css twitter-bootstrap glyphicons