JS:
$(function(){
$(\"#example\").popover({
placement: \'bottom\',
html: \'true\',
title : \'
I have struggle with this one and this is the simplest way to do it, 3 lines of js:
$(document).ready(function() {
// This is to overwrite the boostrap default and show it allways
$('#myPopUp').popover('show');
// This is to destroy the popover when you click the title
$('.popover-title').click(function(){
$('#myPopUp').popover('destroy');
});
});
@import "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css";
/* Just to align my example */
.btn {
margin: 90px auto;
margin-left: 90px;
}
/* Styles for header */
.popover-title {
border: 0;
background: transparent;
cursor: pointer;
display: inline-block;
float: right;
text-align: right;
}