From 8409246d5d46801b8a19284bbd057522be02b9bf Mon Sep 17 00:00:00 2001 From: "Yann Esposito (Yogsototh)" Date: Fri, 11 Jun 2010 11:23:12 +0200 Subject: [PATCH] better menu handling --- content/css/layout.css | 1 + output/Scratch/js/index.js | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/content/css/layout.css b/content/css/layout.css index 3c614f30f..d65ede6c9 100644 --- a/content/css/layout.css +++ b/content/css/layout.css @@ -126,6 +126,7 @@ ul.horizontal position: relative padding-bottom: 10px width = !content_width + top: -1em clear: both !contentMargin = 0em diff --git a/output/Scratch/js/index.js b/output/Scratch/js/index.js index ee5f418e0..66070c74e 100644 --- a/output/Scratch/js/index.js +++ b/output/Scratch/js/index.js @@ -99,22 +99,18 @@ function entete_height() { return $('#entete').height() - $('#menuMessage').height() + decalageTop; } function fastHideMenu() { - $('#content').css({top: - entete_height()}); - $('#menuMessage').html('↓ Menu ↓') + $('#content').css({opacity: .2}); } function hideMenu() { - $('#content').animate({top: - entete_height()}, 500 ); - $('#menuMessage').html('↓ Menu ↓') + $('#content').animate({opacity: .2}, 3000 ); } function showMenu() { - $('#content').animate({top:"-1em"}, 500 ); - $('#menuMessage').html('↑ Menu ↑').click(hideMenu); + $('#content').animate({opacity:1}, 500 ); last+=1; autoHideMenu(last); } function fastShowMenu() { - $('#content').css({top:"-1em"}); - $('#menuMessage').html('↑ Menu ↑').click(hideMenu); + $('#content').css({opacity:1}); last+=1; autoHideMenu(last); } @@ -131,7 +127,7 @@ function autoHideMenu(value) { if ( last == value ) { hideMenu(); } - },5000); + },2000); } function initMenu() { $('#titre').css({top: -entete_height});