/ Published in: jQuery
A lightweight, collapsable menu script that works no matter how many nested lists there are.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('#container ul li a').click(function() { if ( $(this).parent().children('ul').size() > 0 ) { $(this).parent().children('ul:first').toggle(); $(this).parent().siblings().find('ul:visible').hide(); } });