Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap Popover parent?

I'm trying to get a popover to be inserted into a specific element, since at the moment, the popover is being insert straight into <body> (and I need it relative to some other elements). However, I can't seem to find how to get the popover to be inserted into a certain element? How can I trigger this?

Edit: I have found that using "inside" in the placement options will insert it into the element that triggered it. This is close, but I need a way to insert it a bit higher up in the DOM.

like image 238
Brian Avatar asked Oct 15 '25 16:10

Brian


1 Answers

You can update your tooltip.js to this file - my tooltip.js and then select the the element you want to the popover to be appened to by either adding data-container=".element" or with javascript

$(element).popover({ container: '.popover-holder' })

like image 83
Yohn Avatar answered Oct 17 '25 06:10

Yohn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!