Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap popover isn't placed correctly even with container: 'body' set

I've got a button in a table which should toggle a popover. I have set the data-container="body" as well as I have tried it with the javascript version.

My popover looks like this: (I have clicked the first button)

enter image description here

My button code is here:

<button id="testsettracesBtn1" class="btn btn-large btn-danger" data-toggle="popover" title="" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A Title">Click to toggle popover</button>

And here my javascript:

<script type="text/javascript">
      $("#testsettracesBtn1").popover({ container: 'body'});
</script>

How can i achieve it to place my popover right? (And yes I have the newest bootstrap version.)

like image 357
philm5 Avatar asked Jun 25 '13 12:06

philm5


1 Answers

I had the same problem, but the source of the bug was that my Bootstrap framework was outdated. I upgraded to 2.3.2 and the container: 'body' attribute started working.

It caused me quite a headache... until I found out the problem was not in my own code!

like image 103
ktm5124 Avatar answered Nov 06 '22 07:11

ktm5124