Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
24
rated 0 times [  28] [ 4]  / answers: 1 / hits: 43118  / 9 Years ago, tue, may 5, 2015, 12:00:00

I'm trying to use the Bootstrap popover. So I copied the exact code from the example into my website, which unfortunately doesn't work. I pasted the full code below and created a jsfiddle here.



I tried putting it in a bootstrap container and in rows and columns, but nothing seems to work.



Does anybody how I can get that fiddle to work? All tips are welcome!



<!DOCTYPE html>
<html lang=en>
<head>
<script src=//code.jquery.com/jquery-1.11.1.min.js></script>
<script src=//code.jquery.com/ui/1.11.2/jquery-ui.min.js></script>
<link href=//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css rel=stylesheet>
<script src=//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js></script>
</head>
<body>
<button type=button class=btn btn-lg btn-danger data-toggle=popover title=Popover title data-content=And here's some amazing content. It's very engaging. Right?>Click to toggle popover</button>
</body>
</html>

More From » html

 Answers
166

You forgot this :
https://getbootstrap.com/docs/3.4/javascript/#callout-popover-opt-in



For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.


One way to initialize all tooltips on a page would be to select them by their data-toggle attribute:



$(function () {
$('[data-toggle="popover"]').popover()
})

[#66740] Sunday, May 3, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
albert

Total Points: 652
Total Questions: 105
Total Answers: 108

Location: Pitcairn Islands
Member since Fri, Oct 15, 2021
3 Years ago
;