I'm trying to make html inside popover. But it doesn't works .
<a class="tasks-menu" data-toggle="popover" data-placement="bottom">Tasks</a>
<div id="popover_content_wrapper" style="display:none">HIDDEN CONTENT</div>
$(function(){
$('[data-toggle=popover].tasks-menu').popover({
html : true,
content: function() {
return $('#popover_content_wrapper').html();
}
});
});
The Bootstrap popover works fine with your code. If you want to put the entire html of popover_content_wrapper
inside the popover, you should use .clone() instead of .html()
.html() will just get the inside of popover_content_wrapper
, which results in the text "HIDDEN CONTENT" to show in the popover