janmvtrinidad janmvtrinidad - 1 year ago 114
jQuery Question

Boostrap popover not sticking inside modal

The problem is when I use popover outside the modal, it functions as expected, when you scroll down, popover it sticking to its element that triggers the popover.

But when I use it inside the modal, the problem start from there, it is not sticking to element thats trigger the popover.
I'm initializing popover with this code.
Please refer to this demo.

container: "body",
html: true,
content: function () {
return '<div class="popover-message">' + $(this).data("message") + '</div>';


Set the container config to your modal.

i.e. container: $('#myModal').