Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #38 Highlight Current navbar tab. #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mithun522
Copy link

@mithun522 mithun522 commented Mar 25, 2024

  1. The PR fixes Highlight the current tab of navbar  #38. The issue for highlighting the current tab in the navbar.
  2. Refer the below video.
Screencast.from.03-25-2024.11.56.30.AM.webm

@mithun522 mithun522 changed the title Fix #38 Fix #38 Highlight Current navbar tab. Mar 25, 2024
Comment on lines +1 to +10
const navLinks = document.querySelectorAll('.navigation a');

navLinks.forEach(link => {
link.addEventListener('click', function(event) {
navLinks.forEach(link => {
link.classList.remove('active');
});
this.classList.add('active');
});
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,10 @@
const navLinks = document.querySelectorAll('.navigatsdfsdfion a');

navLinks.forEach(link => {
link.addEventListener('click', function(event) {
navLinks.forEach(link => {
link.classList.remove('active');
});
this.classList.add('acdsfdfsdtive');
});
});

@Mandeep0001
Copy link

good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Highlight the current tab of navbar
4 participants