Skip to content

Instantly share code, notes, and snippets.

@e00dan
Created July 6, 2014 11:48
Show Gist options
  • Save e00dan/542c8f24ca91456fb0b4 to your computer and use it in GitHub Desktop.
Save e00dan/542c8f24ca91456fb0b4 to your computer and use it in GitHub Desktop.
(function() {
$("#menu div.category").click(function() {
var temp = $(this).next();
if (typeof(temp.attr('id')) == 'string' && !temp.is(':visible')) {
$("#menu").find('div:has(div:has(div)):visible').each(function() {
if (temp.attr('id') != $(this).attr('id')) {
$(this).hide('blind', 500);
}
});
temp.show('blind', 500);
} else if (typeof(temp.attr('id')) == 'string' && temp.is(':visible')) {
temp.hide('blind', 500);
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment