Created
November 27, 2012 08:28
-
-
Save kshoufer/4153127 to your computer and use it in GitHub Desktop.
jQuery code to fade in a dropdown menu when hovered over.
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
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
$("#nav li").has("ul").hover(function () { | |
$(this).addClass("current").children("ul").show().hide().fadeIn(500); | |
}, function () { | |
$(this).removeClass("current").children("ul").stop(true, true).css("display", "none"); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment