Skip to content

Instantly share code, notes, and snippets.

@shortcircuit3
Created December 3, 2012 16:31
Show Gist options
  • Save shortcircuit3/4196114 to your computer and use it in GitHub Desktop.
Save shortcircuit3/4196114 to your computer and use it in GitHub Desktop.
A simple tooltip
var timeout;
function hide() {
timeout = setTimeout(function () {
$(".tooltip").css('margin-bottom', '-160px');
});
}
$(".button").mouseover(function () {
clearTimeout(timeout);
$(".tooltip").css('margin-bottom', '0');
}).mouseout(hide);
$(".tooltip").mouseover(function () {
clearTimeout(timeout);
}).mouseout(hide);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment