How to display long text and with breaks in a Twitter Bootstrap Popover or Tooltip? And there's one more problem, the popover just opens on the second click! Does anyone know why?
What I did:
$('.btn-text-pop').click(function(event) {
event.preventDefault();
$(this).popover({html:true});
});
$('.btn-text-too').tooltip();
and html
<button
type="button"
data-toggle="popover"
class="btn btn-default btn-xs btn-text-pop"
data-original-title=""
data-container="body"
title=""
data-content="Bacon ipsum dolor sit amet salami tri-tip capicola landjaeger. Kielbasa flank turkey ham hock, fatback capicola chuck jerky tail. Drumstick venison bresaola, ham hock brisket flank doner shankle tail spare ribs short ribs bacon turducken. Pancetta kielbasa turkey pork loin, turducken jerky strip steak. Pancetta shank t-bone tail, beef sirloin jowl frankfurter chicken jerky leberkas beef ribs swine hamburger turkey. Turducken ribeye jerky ball tip shank, capicola corned beef meatloaf frankfurter. Pork belly drumstick prosciutto jerky chicken tail pork loin, shoulder landjaeger sirloin sausage pig.
Chuck pork belly ribeye beef ribs. Kielbasa swine beef pancetta, boudin chicken doner beef ribs shankle venison landjaeger corned beef jowl capicola. Pastrami kielbasa flank, pig brisket turducken cow beef ribs porchetta landjaeger turkey. Pork shankle kielbasa corned beef hamburger filet mignon turducken. Strip steak ham hock t-bone tongue prosciutto drumstick. Sirloin jerky rump meatball. Shoulder capicola jerky meatball, sirloin short loin ground round drumstick rump filet mignon shankle.
Tail pork t-bone beef ribs. Kielbasa ham hock pig venison, salami porchetta capicola ball tip shoulder biltong pork chop filet mignon beef ribs. Spare ribs kevin leberkas capicola, shankle pork belly ham strip steak swine. Salami capicola tongue spare ribs, ham venison meatball.
Tri-tip ribeye biltong beef ribs shankle chicken turducken jerky. Pork loin landjaeger capicola salami, rump kielbasa pork chop shank spare ribs kevin jowl. Chicken drumstick bacon leberkas, jowl tri-tip ground round venison andouille short ribs pork loin boudin flank shankle. Short loin shank ribeye swine, bresaola shankle jerky drumstick. Meatloaf shoulder turkey prosciutto corned beef, boudin meatball shankle venison doner pork chop rump biltong pig shank.
T-bone landjaeger porchetta pancetta. Ham hock tail sausage meatball pig fatback. Jowl frankfurter landjaeger biltong capicola sausage tri-tip salami sirloin jerky kevin doner. Tri-tip sausage chicken boudin ham.
Does your lorem ipsum text long for something a little meatier? Give our generator a try… it’s tasty!">
<span class="glyphicon glyphicon-align-left"></span>
</button>
<br><br>
<button
type="button"
data-toggle="tooltip"
data-placement="right"
class="btn btn-default btn-xs btn-text-too"
title="Bacon ipsum dolor sit amet salami tri-tip capicola landjaeger. Kielbasa flank turkey ham hock, fatback capicola chuck jerky tail. Drumstick venison bresaola, ham hock brisket flank doner shankle tail spare ribs short ribs bacon turducken. Pancetta kielbasa turkey pork loin, turducken jerky strip steak. Pancetta shank t-bone tail, beef sirloin jowl frankfurter chicken jerky leberkas beef ribs swine hamburger turkey. Turducken ribeye jerky ball tip shank, capicola corned beef meatloaf frankfurter. Pork belly drumstick prosciutto jerky chicken tail pork loin, shoulder landjaeger sirloin sausage pig.
Chuck pork belly ribeye beef ribs. Kielbasa swine beef pancetta, boudin chicken doner beef ribs shankle venison landjaeger corned beef jowl capicola. Pastrami kielbasa flank, pig brisket turducken cow beef ribs porchetta landjaeger turkey. Pork shankle kielbasa corned beef hamburger filet mignon turducken. Strip steak ham hock t-bone tongue prosciutto drumstick. Sirloin jerky rump meatball. Shoulder capicola jerky meatball, sirloin short loin ground round drumstick rump filet mignon shankle.
Tail pork t-bone beef ribs. Kielbasa ham hock pig venison, salami porchetta capicola ball tip shoulder biltong pork chop filet mignon beef ribs. Spare ribs kevin leberkas capicola, shankle pork belly ham strip steak swine. Salami capicola tongue spare ribs, ham venison meatball.
Tri-tip ribeye biltong beef ribs shankle chicken turducken jerky. Pork loin landjaeger capicola salami, rump kielbasa pork chop shank spare ribs kevin jowl. Chicken drumstick bacon leberkas, jowl tri-tip ground round venison andouille short ribs pork loin boudin flank shankle. Short loin shank ribeye swine, bresaola shankle jerky drumstick. Meatloaf shoulder turkey prosciutto corned beef, boudin meatball shankle venison doner pork chop rump biltong pig shank.
T-bone landjaeger porchetta pancetta. Ham hock tail sausage meatball pig fatback. Jowl frankfurter landjaeger biltong capicola sausage tri-tip salami sirloin jerky kevin doner. Tri-tip sausage chicken boudin ham.
Does your lorem ipsum text long for something a little meatier? Give our generator a try… it’s tasty!">
<span class="glyphicon glyphicon-align-left"></span>
</button>
Link to jsfiddle