Hi,
Thanks for your answer. I tested a bit myself and this is what I currently have.
There are 6 link buttons that all open a different DIV that slides out from the bottom of the menu when clicked. This is the jQuery code for one of the 6 buttons. The other 6 are identical apart from the target panel:
- $("#link_w1").click(function () {
$('ul').find("li").removeClass("highlight");
$("#menu_item_w1").addClass("highlight");
$("#menupanel_w1").slideToggle("slow");
$("#menupanel_m1").hide();
$("#menupanel_d1").hide();
$("#menupanel_d2").hide();
$("#menupanel_b1").hide();
$("#menupanel_s1").hide();
return false;
}); Note: The highlight class is giving the clicked button a background color. The removeclass it to reset all other buttons when another button is clicked.
This works fine for what I need. Only I guess the code is abit quick and dirty. Is there a way to do it better? I preferably want to work around my method to hide all other panels in seperate lines. It should basically hider all inactive panels and when the button of the active panel is clicked it should come out or go back in.
Thank you!