Skip to content

Instantly share code, notes, and snippets.

@stephanschuler
Last active May 24, 2017 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephanschuler/e5f96ccb6a670cbcc5672dcaca64673f to your computer and use it in GitHub Desktop.
Save stephanschuler/e5f96ccb6a670cbcc5672dcaca64673f to your computer and use it in GitHub Desktop.
$(function() {
var timeout;
$('#contact').hover(start, stop);
function start() {
stop();
run();
}
function stop() {
clearTimeout(timeout);
}
function run() {
if (!$('#contact span.content').is(":visible")) {
return;
}
timeout = setTimeout(run, 500);
// whatever
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment