JS:
$(function(){ $(\"#example\").popover({ placement: \'bottom\', html: \'true\', title : \'
For me this is the simplest solution to add a close button in a popover.
HTML:
Show popover Create Cancel
Javascript:
document.addEventListener("click",function(e){ // Close the popover if (e.target.id == "close_popover"){ $("[data-toggle=popover]").popover('hide'); } });