diff --git a/hamburger.js b/hamburger.js new file mode 100644 index 0000000..68ce875 --- /dev/null +++ b/hamburger.js @@ -0,0 +1,9 @@ +var button = document.getElementById("hamburgerButton"); +var menu = document.getElementById("hamburgerMenu"); + +var open = false; + +button.addEventListener('click', function(){ + menu.style.left = (open)? '-382px' : '0px'; + open = !open; +}, false); diff --git a/images/menu.png b/images/menu.png new file mode 100644 index 0000000..8d52287 Binary files /dev/null and b/images/menu.png differ diff --git a/index.css b/index.css index f4b57fe..e0e1b50 100644 --- a/index.css +++ b/index.css @@ -1,6 +1,6 @@ body { - padding:0px; + padding:0px; overflow:hidden; } @@ -38,7 +38,7 @@ nav { position: absolute; top:0px; - left:0px; + left:-382px; width: 380px; height: 100%; padding: 0px; @@ -47,6 +47,9 @@ nav border-right: 2px solid #2b2b2b; z-index: 50; margin:0; + + transition-property:all; + transition-duration:0.4s; } nav .onglet @@ -209,7 +212,7 @@ table tr { - height:250px; + height:250px; border-style:none; margin:0; width:100%; diff --git a/index.html b/index.html index 781ed0e..d2ed9e3 100644 --- a/index.html +++ b/index.html @@ -9,11 +9,12 @@
+ menu logo ESIR
- - + +