Created
March 26, 2012 22:03
-
-
Save avdg/2210109 to your computer and use it in GitHub Desktop.
Bootstrap popover triggered by hover, fading away in few seconds
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
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(){}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome stuff.
I wish we could get similar snippet for tooltips that autonomously fade out after a set time.