AbdelGawad (Talk | contribs) |
AbdelGawad (Talk | contribs) |
||
Line 19: | Line 19: | ||
//this function controls the expand and collapse buttons of the menu and changes the +/- symbols | //this function controls the expand and collapse buttons of the menu and changes the +/- symbols | ||
function menu_functionality() { | function menu_functionality() { | ||
+ | //when clicking on a "menu_button", it will change the "+/-" accordingly and it will show/hide the corresponding submenu | ||
+ | $(".menu_button").click(function(){ | ||
− | + | // add or remove the class "open" , this class holds the "-" | |
− | + | $(this).children().toggleClass("open"); | |
− | + | // show or hide the submenu | |
− | + | $(this).next('.submenu_wrapper').fadeToggle(400); | |
− | // | + | }); |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | //hide | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
Revision as of 20:36, 7 August 2017