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