Twitter bootstrap popover not working

I am using the popover plugin from Bootstrap. ( link ), but it does not work.

HTML:

<a data-placement='above' class='danger' rel='popover' data-content='test code here' href='#'>Click</a> 

JavaScript:

 <script type='text/javascript' src="../js/jquery.js"></script> <script type='text/javascript' src="../js/twipsy.js"></script> <script type='text/javascript' src="../js/popover.js"></script> 
+4
source share
1 answer

The best way is to add the following script code:

 <script> $(function () { $("a[rel=popover]") .popover({ offset: 10 }) .click(function (e) { e.preventDefault() }) }) </script> 

Thus, all elements a with the attribute rel = "popover" will be displayed in this popover.

No changes are required for your code, and it works great ... at least on my machine, of course ;-)
Give it a try!

+3
source

Source: https://habr.com/ru/post/1391118/


All Articles