How can I add a line break in my popover content? Neither the line break tag, nor the new line character is working. This is what I'm trying:
$(".foo").hover(function () {
$(this).popover({
title: "Bar",
content: "Line 1 <br /> Line 2 \n Line 3"
}).popover('show');
}, function () {
$(this).popover('hide');
});
The <br> HTML element produces a line break in text (carriage-return).
Just use the entity code 
 for a linebreak in a title attribute.
You can use 
 or 
 .
$(document). on('click','#bulk_actions_btn',function(){ if(condition){ $('[data-toggle="popover"]'). popover(); //here if the condition is true then popover should be display. }
You need to pass the option html: true
when you initialize the popover. Then <br />
and other html tags should work:
$(".foo").hover(function () {
$(this).popover({
title: "Bar",
content: "Line 1 <br /> Line 2 <br /> Line 3",
html: true
}).popover('show');
}, function () {
$(this).popover('hide');
});
https://groups.google.com/forum/?fromgroups=#!topic/twitter-bootstrap/bhtpERLYCo4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With