Skip to content

Commit

Permalink
Implemented suggested improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Shweta-1902 committed Oct 12, 2024
1 parent 681cb31 commit 7f6f6c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,10 @@ <h4 id="custom-follow-heading">Follow Us</h4>
window.onscroll = function() {
var navbar = document.querySelector(".navbar");
if (window.scrollY > 50) {
navbar.style.backgroundColor = "rgba(0, 0, 0, 0.8)"; // Dark background on scroll
navbar.style.backgroundColor = "none"; // Dark background on scroll
navbar.querySelectorAll("a").forEach(a => a.style.color = "white"); // Change link color
} else {
navbar.style.backgroundColor = "rgba(0, 0, 0, 0.8)"; // Revert back to light background
navbar.style.backgroundColor = "none"; // Revert back to light background
navbar.querySelectorAll("a").forEach(a => a.style.color = "white"); // Revert link color
}
};
Expand Down

0 comments on commit 7f6f6c7

Please sign in to comment.