Difference between revisions of "Template:AFCM-Egypt"

Line 20: Line 20:
 
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(){
+
 
 +
 
 +
 
 +
//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();
 +
});
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
  
// add or remove the class "open" , this class holds the "-"
 
$(this).children().toggleClass("open");
 
// show or hide the submenu
 
$(this).next('.submenu_wrapper').fadeToggle(1000);
 
});
 
  
  

Revision as of 20:34, 7 August 2017