Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap: popover on modals

I want to use the popover effect on an existing modals dialog using the Bootstrap CSS Library from Twitter. I bind the popover to the small image icon.

$('#infoIcon').popover({
    offset: 50,
    placement: 'right'
});

The modals itself is also added according the documentation:

$('#modalContainer').modal({
    keyboard : true
});

But the effect I've got is, that the popover is rendered UNDER the modal container instead OVER the modal div (see the screenshot below). How can I bring the popover truly OVER the modal div ?

enter image description here

like image 923
Dominik Avatar asked Oct 06 '11 13:10

Dominik


People also ask

How do I open modal popup on modal popup?

To trigger the modal window, you need to use a button or a link. Then include the two data-* attributes: data-toggle="modal" opens the modal window. data-target="#myModal" points to the id of the modal.

What is popover modal?

About Modal Popovers Modals provide a nice way to provide extra details without navigating away from the page completely, but they hide your current context and feel a bit 90's. Popovers are essentially stylish tooltips which provide a little extra information without losing context.

How do I customize Bootstrap popover?

To create a popover, you need to add the data-bs-toggle="popover" attribute to an element. Whereas, popover's title and its content that would display upon trigger or activation can be specified using the title and data-bs-content attribute respectively. Here is the standard markup for adding a popover to a button.


2 Answers

The guys at Bootstrap identifies this issue as a bug and fixed it for the next release. see more details here

like image 97
Dominik Avatar answered Sep 18 '22 02:09

Dominik


You don't need javascript for that, simply set the z-index of the popover via CSS:

.popover {
    z-index: 1060;
}
like image 24
ksiomelo Avatar answered Sep 19 '22 02:09

ksiomelo