"Basic Popup Example"
Bootstrap 3.0.0 Snippet by mwood073

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<style> h4{ margin-top:50px; }</style>
<h1 class="page-header">Popup</h1>
<h4>Default Popup</h4>
<button data-content="popup data" data-placement="right" data-toggle="show-popover" data-container="body" class="btn btn-default" type="button" data-original-title="" title="">
default open popup
</button>
<h4>Popup with Heading</h4>
<a title="" data-content="popup data" data-placement="top" data-toggle="popover" class="btn" data-original-title="Popover heading">Popover on click</a>
<h4>Popup positions</h4>
<div class="tooltip-demo">
<button data-content="popup at left" data-placement="left" data-toggle="popover" data-container="body" class="btn btn-default" type="button" data-original-title="" title="">
Popover on left
</button>
<button data-content="popup at top" data-placement="top" data-toggle="popover" data-container="body" class="btn btn-default" type="button" data-original-title="" title="">
Popover on top
</button>
<button data-content="popup at bottom" data-placement="bottom" data-toggle="popover" data-container="body" class="btn btn-default" type="button" data-original-title="" title="">
Popover on bottom
</button>
<button data-content="popup at right" data-placement="right" data-toggle="popover" data-container="body" class="btn btn-default" type="button" data-original-title="" title="">
Popover on right
</button>
</div>
<h4></h4>
</div>
<script>
$("[data-toggle=show-popover]").popover('show');
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: