Last active
June 12, 2020 16:24
-
-
Save ryandejaegher/76414a7d76ae4d5491e3b5bebd211e5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Add this code to Design -> Custom CSS */ | |
.arch-style { | |
/* add your styles here */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this code to Settings -> Advanced -> Code Injection -> Footer | |
<script> | |
(function () { | |
window.addEventListener("load", function () { | |
var navLinks = document.querySelectorAll("header a, footer a,a"); | |
var getActiveLink = navLinks.forEach((item) => { | |
if (item.href === window.location.href) { | |
item.classList.add("arch-style"); | |
console.log(item); | |
} | |
}); | |
}); | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment