The pop-up box (PopOver), like a ToolTip (Tooltip), provides an expanded view. If you want to activate the pop-up box, the user simply hover the mouse over the element. The contents of the pop-up box are completely populated with the Bootstrap Data API (BOOTSTRAP). This method relies on ToolTips (tooltip).
1 set delay, more than the time delay is not moved into the window, the window is hidden
Tooltip.prototype.init = function{
var triggers = This.options.trigger.split (") followed by
//Set delay
if ( This.options.trigger.indexOf (' hover ') >-1) {
$.extend (true, this.options, {delay: {hide:100}});
2 control does not disappear code
In Tooltip.prototype.enter = function (obj) {
Cleartimeout (Self.timeout) after joining
if (self.options.trigger.indexOf (' hover ') >-1) {
self. $tip. Unbind (' MouseEnter '). Bind (' MouseEnter ', function
Self.hoverstate = ' in ';
}). Unbind (' MouseLeave '). Bind (' MouseLeave ', function (e) {
self.hoverstate = ' out ';
Self.timeout = settimeout (function () {
if (self.hoverstate = ' out ') self.hide ()
}, Self.options.delay.hide) c10/>})
}
Bootstrap version: v3.3.6
Let's Add the pop-up box (popover) usage
The pop-up box (popover) plug-in generates content and markup based on requirements, and by default, the pop-up box (PopOver) is placed behind their triggering elements. You can add a pop-up box (PopOver) in the following two ways:
With the Data property: To add a pop-up box (popover), simply add data-toggle= "PopOver" to an anchor/button tag. The title of the anchor is the text of the pop-up box (PopOver). By default, the plug-in sets the pop-up box (PopOver) to the top.
<a href= "#" data-toggle= "PopOver" title= "Example popover" >
please hover over my top
</a>
Through JavaScript: Enable pop-up box (PopOver) via javascript:
$ (' #identifier '). PopOver (Options)
The pop-up box (popover) plugin is not a pure CSS plug-in, unlike the Drop-down menus and other plug-ins discussed earlier. To use this plug-in, you must use jquery to activate it (read JavaScript). Use the following script to enable all pop-up boxes on the page (popover):
$ (function () {$ (' [data-toggle= ' popover '] '). PopOver ();});