i am facing now problem for nested accordion.
demo : http://jsfiddle.net/cyber007/baUH8/ .. 1st level accordion is fine now i need 2nd level also. like
<li class='has-sub'><a href='#'><img src="images/icon-2.png" />General Setting<i>Protocol Utilization</i></a>
<ul>
<li><a href='#'><span>Widgets</span></a></li>
<li class='has-sub'><a href='#'><span>Menus</span></a>
<ul>
<li><a href='#'><span>test 3rd</span></a></li>
<li><a href='#'><span>test 3rd</span></a></li>
<li class='last'><a href='#'><span>test 3rd</span></a></li>
</ul>
</li>
i want to add another accordion under Menus in html added but it not work. can you guys tell me how to do.
Check This Have a Same Function as you want
Javascript:
$(document).ready(function() {
$('.sidebar ul li a').click(function(ev) {
$('.sidebar .sub-menu').not($(this).parents('.sub-menu')).slideUp();
$(this).next('.sub-menu').slideToggle();
ev.stopPropagation();
});
});
Your Code is Edited Here Please check it Demo
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments