Bou*_*ess 13 jquery twitter-bootstrap
如何在弹出窗口内容中添加换行符?换行标记和换行符都不起作用.这就是我正在尝试的:
$(".foo").hover(function () {
$(this).popover({
title: "Bar",
content: "Line 1 <br /> Line 2 \n Line 3"
}).popover('show');
}, function () {
$(this).popover('hide');
});
Run Code Online (Sandbox Code Playgroud)
ant*_*ome 48
html: true初始化弹出窗口时需要传递该选项.那么<br />和其他html标签应该工作:
$(".foo").hover(function () {
$(this).popover({
title: "Bar",
content: "Line 1 <br /> Line 2 <br /> Line 3",
html: true
}).popover('show');
}, function () {
$(this).popover('hide');
});
Run Code Online (Sandbox Code Playgroud)
https://groups.google.com/forum/?fromgroups=#!topic/twitter-bootstrap/bhtpERLYCo4