├── script.js
├── README.md
├── index.html
└── style.css
/script.js:
--------------------------------------------------------------------------------
1 | const hamburger = document.querySelector(".hamburger");
2 | const navMenu = document.querySelector(".nav-menu");
3 |
4 | hamburger.addEventListener("click", mobileMenu);
5 |
6 | function mobileMenu() {
7 | hamburger.classList.toggle("active");
8 | navMenu.classList.toggle("active");
9 | }
10 |
11 |
12 | // when we click on hamburger icon its close
13 |
14 | const navLink = document.querySelectorAll(".nav-link");
15 |
16 | navLink.forEach(n => n.addEventListener("click", closeMenu));
17 |
18 | function closeMenu() {
19 | hamburger.classList.remove("active");
20 | navMenu.classList.remove("active");
21 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Responsive-Navbar
2 | Responsive Navbar Using HTML, CSS and JAVASCRIPT
3 |
4 | A navbar, short for "navigation bar," is a graphical user interface element used to provide links and navigation to different pages or sections of a website. It typically appears at the top of a webpage and can be fixed, meaning it stays in place as the user scrolls, or static, meaning it scrolls with the page. A well-designed navbar should be easy to use, with clear and descriptive labels, and help users quickly find what they are looking for on a website. It can be created using HTML and styled with CSS to fit the overall design and branding of a website.
5 |
6 | Check this Navbar on server live : https://curiousnavbar.netlify.app
7 |
8 | "Hi there! I wanted to drop a quick message to let you know about my Instagram account. As a coder, I often post about my latest coding projects, and I also share tips and insights for fellow developers.
9 | If you're interested in checking it out, my handle is : https://www.instagram.com/curious_coder_aman/
10 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |