Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter Bootstrap Popover - DOM Insertion Location

I have Bootstrap Popovers working fine, but the popover get's appended to body at the bottom of the document, as opposed to just below the triggering element, as it does in the bootstrap documentation: http://twitter.github.com/bootstrap/javascript.html#popovers

Anyone know how to control where a popover is inserted? Or at the very least, get it to append to the triggering elements parent?

Here's what I have:

http://jsfiddle.net/qt34N/4/

 <a href="#" class="btn" rel="popover" data-placement="top" 
  data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." 
  data-original-title="Popover on top">Popover on top</a>

jQuery:

$("a[rel=popover]").popover();

Suggestions?

like image 752
chuuke Avatar asked Dec 01 '25 12:12

chuuke


1 Answers

The demo is using a newer version of bootstrap. Update to the latest and it will perform like you want it to.

http://jsfiddle.net/qt34N/10/

jQuery(document).ready(function($) {
    $("a[rel=popover]").popover();
});​
like image 87
Kevin B Avatar answered Dec 03 '25 03:12

Kevin B



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!