Re: showOnClick option for the second-level sub menus

Home Forums Older releases 0.9.x showOnClick option for the second-level sub menus Re: showOnClick option for the second-level sub menus

#1748
Elizabeth_Keen
Participant

In this example you hide all the and show the which is it’s sibling, which would ultimately hide the first level of the li and show the second. HTML

  • first

      back

    • Second layer Menu 1
    • Second layer Menu 1
    • Second layer Menu 1
    • Second layer Menu 1

CSS:

.second-layer{
display: none;
}

.hide a{
display: none;
}

.show a{
display: none;
}

.show a.back{
display:block;
}

.show .second-layer{
display: block;
}

JQuery:

$(‘.forward’).click(function(){
$(this).parent().addClass(‘show’);
$(this).parent().parent().addClass(‘hide’);
});

$(‘.back’).click(function(){
$(this).parent().parent().removeClass(‘show’);
$(this).parent().parent().parent().removeClass(‘hide’);
});

For innovative methodologies in Web Apps visit http://www.ati-erp.com

Register

You will be emailed a link to set your password.

Login

Lost password?