Skip to content

Instantly share code, notes, and snippets.

@arielsalminen
Created May 8, 2012 10:21
Show Gist options
  • Save arielsalminen/2634071 to your computer and use it in GitHub Desktop.
Save arielsalminen/2634071 to your computer and use it in GitHub Desktop.
Simple drop down that opens on hover
jQuery(function () {
var timer = 0,
delay = 350;
$(".dropdown").hover(function () {
clearTimeout(timer);
$(this).addClass("active").find("ul").show();
}, function () {
timer = setTimeout(function () {
$(".dropdown").removeClass("active").find("ul").hide();
}, delay);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment