Skip to content

Instantly share code, notes, and snippets.

@timneutkens
Last active June 2, 2021 13:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timneutkens/115d96b97187a6cf6d1f4bce9c0d6e74 to your computer and use it in GitHub Desktop.
Save timneutkens/115d96b97187a6cf6d1f4bce9c0d6e74 to your computer and use it in GitHub Desktop.
Keep Bootstrap popover open when the popover itself is being hovered
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);
});
@h3158980
Copy link

can you provide me the html file for this with all those classes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment