Last active
June 2, 2021 13:24
-
-
Save timneutkens/115d96b97187a6cf6d1f4bce9c0d6e74 to your computer and use it in GitHub Desktop.
Keep Bootstrap popover open when the popover itself is being hovered
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery('[data-toggle="popover-hover"]').popover({ | |
trigger: 'manual', | |
html: true, | |
animation:false, | |
viewport: '.container' | |
}).on('mouseenter', function () { | |
var self = this; | |
jQuery(this).popover("show"); | |
jQuery(".popover").on('mouseleave', function () { | |
jQuery(self).popover('hide'); | |
}); | |
}).on('mouseleave', function () { | |
var self = this; | |
setTimeout(function () { | |
if (!jQuery('.popover:hover').length) { | |
jQuery(self).popover('hide'); | |
} | |
}, 600); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can you provide me the html file for this with all those classes