Skip to content

Instantly share code, notes, and snippets.

@avdg
Created March 26, 2012 22:03
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save avdg/2210109 to your computer and use it in GitHub Desktop.
Bootstrap popover triggered by hover, fading away in few seconds
var tmp = null;
$('###selector###').popover({
trigger: 'manual',
title: 'testing',
delay: {show:500, hide:100}
});
$('###selector###').hover(function(){
clearTimeout(tmp);
$('###selector###').popover('show');
tmp = setTimeout(function(){$('###selector###').popover('hide')}, 1000);
}, function(){});
@agmt5989
Copy link

agmt5989 commented Nov 5, 2018

Awesome stuff.
I wish we could get similar snippet for tooltips that autonomously fade out after a set time.

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