Skip to content

Instantly share code, notes, and snippets.

@eheiser
Created June 7, 2011 00:30
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save eheiser/1011433 to your computer and use it in GitHub Desktop.
//show-hide widgets on homepage - this was unusable on hover
$('#utility li > a').click(function() {
target = $(this).next();
if ($(target).css('display') !='none' ) {
$(target).slideUp(500).removeClass('open');
e.preventDefault();
}
else
{
$("ul.sub").not(target).each(function(){
if ($(this).css('display')!='none'){$(this).hide();}
});
$(target).slideDown(500).addClass('open');
e.preventDefault();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment