$(function(){
$('#accordian ul:first').show();
$('#accordian li a').click(
function accmenu(){
var accstatus = $(this).next();
if ((accstatus.is('ul')) && (accstatus.is(':visible')))
{
accstatus.slideUp();
}
if ((accstatus.is('ul')) && (!accstatus.is(':visible')))
{
accstatus.slideDown();
}
});
});
When we are nesting the child menu list into the parent menu list in a vertical manner, we can add this accordion style. It'll be more straight forward and clear to understand.
No comments:
Post a Comment