🔞 ADULT: Bootstrap/bootstrap popover.asp - Full Archive
Bootstrap 3 Tutorial
BS HOME BS Get Started BS Grid Basic BS Typography BS Tables BS Images BS Jumbotron BS Wells BS Alerts BS Buttons BS Button Groups BS Glyphicons BS Badges/Labels BS Progress Bars BS Pagination BS Pager BS List Groups BS Panels BS Dropdowns BS Collapse BS Tabs/Pills BS Navbar BS Forms BS Inputs BS Inputs 2 BS Input Sizing BS Media Objects BS Carousel BS Modal BS Tooltip BS Popover BS Scrollspy BS Affix BS FiltersBootstrap Grids
BS Grid System BS Stacked/Horizontal BS Grid Small BS Grid Medium BS Grid Large BS Grid ExamplesBootstrap Themes
BS Templates BS Theme "Simply Me" BS Theme "Company" BS Theme "Band"Bootstrap 3 Cert
BS3 CertificateBootstrap Examples
BS Examples BS Editor BS Quiz BS Exercises BS Interview PrepBootstrap CSS Ref
CSS All Classes CSS Typography CSS Buttons CSS Forms CSS Helpers CSS Images CSS Tables CSS Dropdowns CSS Navs GlyphiconsBootstrap JS Ref
JS Affix JS Alert JS Button JS Carousel JS Collapse JS Dropdown JS Modal JS Popover JS Scrollspy JS Tab JS TooltipBootstrap Popover Plugin
The Popover Plugin
The Popover plugin is similar to tooltips; it is a pop-up box that appears when the user clicks on an element. The difference is that the popover can contain much more content.
Tip: Plugins can be included individually (using Bootstrap's individual "popover.js" file), or all at once (using "bootstrap.js" or "bootstrap.min.js").
How To Create a Popover
To create a popover, add the data-toggle="popover"
attribute to an element.
Use the title attribute to specify the header text of the popover, and use the data-content attribute to specify the
text that should be displayed inside the popover's body:
<a href="#" data-toggle="popover" title="Popover Header" data-content="Some content inside the popover">Toggle popover</a>
Note: Popovers must be initialized with jQuery: select the
specified element and call the popover() method.
The following code will enable all popovers in the document:
Example
<script>
$(document).ready(function(){
$('[data-toggle="popover"]').popover();
});
</script>
Try it Yourself »
Positioning Popovers
By default, the popover will appear on the right side of the element.
Use the data-placement attribute to set the position of the
popover on top, bottom, left or the right side of the element:
Example
<a href="#" title="Header" data-toggle="popover" data-placement="top" data-content="Content">Click</a>
<a href="#" title="Header" data-toggle="popover" data-placement="bottom" data-content="Content">Click</a>
<a href="#" title="Header" data-toggle="popover" data-placement="left" data-content="Content">Click</a>
<a href="#" title="Header" data-toggle="popover" data-placement="right" data-content="Content">Click</a>
Try it Yourself »
Tip: You can also use the data-placement attribute with a value of "auto", which will let the browser decide the position of the popover. For example, if the value is "auto left", the popover will display on the left side when possible, otherwise on the right.
Closing Popovers
By default, the popover is closed when you click on the element
again. However, you can use the data-trigger="focus" attribute which will close
the popover when clicking outside the element:
Example
<a href="#" title="Dismissible popover" data-toggle="popover" data-trigger="focus" data-content="Click anywhere in the document to close this popover">Click me</a>
Try it Yourself »
Tip: If you want the popover to be displayed when you move
the mouse pointer over the element, use the data-trigger attribute with a value of
"hover":
Example
<a href="#" title="Header" data-toggle="popover" data-trigger="hover" data-content="Some content">Hover over me</a>
Try it Yourself »
Complete Bootstrap Popover Reference
For a complete reference of all popover options, methods and events, go to our Bootstrap JS Popover Reference.
Contact Sales
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com
Report Error
If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com
Top Tutorials
HTML TutorialCSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
W3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial
Top References
HTML ReferenceCSS Reference
JavaScript Reference
SQL Reference
Python Reference
W3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
AngularJS Reference
jQuery Reference
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.
Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.