Skip to content

Instantly share code, notes, and snippets.

@avdg
Created March 26, 2012 22:03
Show Gist options
  • Save avdg/2210109 to your computer and use it in GitHub Desktop.
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