Created
July 9, 2013 10:03
-
-
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
This file contains hidden or 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
// 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