Brian
Brian

Reputation: 2829

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.

Upvotes: 4

Views: 15318

Answers (2)

sja87
sja87

Reputation: 1

another script for bootstrap partent hover option

https://github.com/sja87/bootstrap-tooltip-parent

Upvotes: 0

Yohn
Yohn

Reputation: 2559

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' })

Upvotes: 5

Related Questions