Skip to content

Instantly share code, notes, and snippets.

@erickarbe
Created May 16, 2012 20:17
Show Gist options
  • Save erickarbe/2713607 to your computer and use it in GitHub Desktop.
Save erickarbe/2713607 to your computer and use it in GitHub Desktop.
Simple jQuery Dropdown Script
$(function(){
$("ul.dropdown li").hover(function(){
$(this).addClass("hover");
$('ul:first',this).css('visibility', 'visible');
}, function(){
$(this).removeClass("hover");
$('ul:first',this).css('visibility', 'hidden');
});
$("ul.dropdown li ul li:has(ul)").find("a:first").append(" » ");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment