From 6b97b41a1342467d39a7c2d4e0d39f3ef8ba9400 Mon Sep 17 00:00:00 2001 From: Hacene Ouserir Date: Sun, 16 Jan 2022 18:38:03 +0100 Subject: [PATCH] Fix burger button for RWD... --- css/app.css | 1 + index.html | 4 +++- js/app.js | 20 ++++++++++++-------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/css/app.css b/css/app.css index ec03c9c..cccdee8 100644 --- a/css/app.css +++ b/css/app.css @@ -84,6 +84,7 @@ header { /* Hide the icon of small screens */ .navbar .icon { display: none; + cursor: pointer; } /* Style multi sections & footer */ diff --git a/index.html b/index.html index 1267a4b..95e6e64 100644 --- a/index.html +++ b/index.html @@ -25,7 +25,7 @@ Services Review Contact Me - + @@ -145,6 +145,8 @@

Contact Me

+ + diff --git a/js/app.js b/js/app.js index 541af63..4ac86af 100644 --- a/js/app.js +++ b/js/app.js @@ -18,11 +18,15 @@ function backToTop() { document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera } -function myFunction() { - var nav = document.getElementById("myTopnav"); - if (nav.className === "navbar") { - nav.className += " responsive"; - } else { - nav.className = "navbar"; - } -} \ No newline at end of file +// function myFunction() { +// var nav = document.getElementById("myTopnav"); +// if (nav.className === "navbar") { +// nav.className += " responsive"; +// } else { +// nav.className = "navbar"; +// } +// } + +$('.icon').click(function () { + $('#myTopnav').toggleClass('responsive'); +}); \ No newline at end of file