I'm trying to create a dynamic Bootstrap popover with HTML content when hovering over a button. Here's what I have so far:
$(".btn.btn-navbar").hover(function() {
html = '<ul class="nav"><li><a href="#">hello</li><li><a href="#">hello2</li></ul>';
$link = $('<a href="myreference.html" class="p1" data-html="true" data-bind="popover"'
+ ' data-content="' + html + '">');
console.log('$link', $link);
$(this).html($link);
// Open the popover
$link = $(this).find('a');
$link.popover("show");
}, function() {
console.log('$hi there ');
});
I'm struggling to display the HTML content properly in the popover. Can anyone help me with this?