The Bootstrap Popover plugin is not displaying the HTML content properly.
I have a button inside the popover and when clicking that button I need to perform some action. When I add the onclick
function on the button, the button disappears from the popover.
Also, the button and popover are randomly generated so I can't use the jQuery onclick.
Can anyone help me with why the button is not displayed if I add an onclick
function in the bootstrap popover?
$('.popover-menu').popover({
'html': true,
'placement': 'top',
'trigger': 'manual',
'animation': false,
'container': 'body',
'template': '<div class="popover popover-menu-wrapper"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>',
'content': function () {
var content = $(this).attr('id');
return $("#" + content + "Popover").html();
}
});