Skip to content

Instantly share code, notes, and snippets.

@nikolaifedorov
Created July 9, 2013 10:03
Show Gist options
  • Save nikolaifedorov/5956194 to your computer and use it in GitHub Desktop.
Save nikolaifedorov/5956194 to your computer and use it in GitHub Desktop.
Simple Multi level JQuery Accordion Code http://sower.com.au/demo/accordion.html
// Copyright (c) 2011 Peter Chapman - www.topverses.com
// Freely distributable for commercial or non-commercial use
$(document).ready(function() {
$('#menu ul').hide();
$('#menu li a').click(
function() {
var openMe = $(this).next();
var mySiblings = $(this).parent().siblings().find('ul');
if (openMe.is(':visible')) {
openMe.slideUp('normal');
} else {
mySiblings.slideUp('normal');
openMe.slideDown('normal');
}
}
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment