reorganisation des dossiers
[mtweb] / mw / out / default / js / menu.js
diff --git a/mw/out/default/js/menu.js b/mw/out/default/js/menu.js
new file mode 100644 (file)
index 0000000..aca3c76
--- /dev/null
@@ -0,0 +1,29 @@
+$(document).ready(
+  function (){
+    init_menu_links();
+  }
+);
+
+// ---------------------------------------- menus header
+
+var menu = null;
+
+function checkHover(){
+  if(menu) menu.find('ul').fadeOut('fast');
+}
+
+function init_menu_links(){
+  $('.menu li').hover(
+    function(){
+      if(menu){
+        menu.find('ul').fadeOut('fast');
+        menu = null;
+      }
+      $(this).find('ul').fadeIn('fast');
+    },
+    function(){
+      menu = $(this);
+      setTimeout("checkHover()", 80);
+    }
+  );
+}