Difference between revisions of "Template:AFCM-Egypt"

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);
//show subnav on hover
+
});
$(".menu_button").mouseenter(function() {
+
$(this).children().stop(true, true).slideDown();
+
});
+
+
//hide submenus on exit
+
$(".menu_button").mouseleave(function() {
+
$(this).find("ul").stop(true, true).slideUp();
+
});
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
  
  

Revision as of 20:36, 7 August 2017