A popover is a small JavaScript library for creating tooltip-style popups and a popup menu around any DOM you select.
Features:
- It is triggered by a click or scroll event.
- Smart positioning.
- Smooth transitions.
- With the arrow symbol/icon or not.
How to make use of it:
1. Import the mandatory JavaScript and CSS information into the document.
<link rel="stylesheet" href="dist/popover.min.css" /> <script src="dist/popover.min.js"></script>
2. Insert content material into the popover.
<div id="popover-target"> <div class="pop-comp-content">Popover Content</div> </div>
3. Attach the popover to a component.
<button class="popover-demo" data-popover-target="#popover-target"> Click Me </button>
PopoverComponent.init({ ele: '.popover-demo' });
4. You can the showOnHover choice to true if you want to show the popover on hover similar to a tooltip.
PopoverComponent.init({ ele: '.popover-demo', showOnHover: true });
5. You can also go the choices by way of HTML data-*
attributes as follows:
<div class="popover-demo" data-popover-position="bottom" ></div>
6. Trigger features after the popover is proven & hidden.
PopoverComponent.init({ ele: '.popover-demo', beforeShow: function(){ // do something }, beforeHide: function(){ // do something } afterShow: function(){ // do something }, afterHide: function(){ // do something } });
See Demo And Download
Official Website(sa-si-dev): Click Here
This superior jQuery/javascript plugin is developed by sa-si-dev. For extra Advanced Usage, please go to the official website.