Skip to content

Instantly share code, notes, and snippets.

@ryandejaegher
Last active June 12, 2020 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryandejaegher/76414a7d76ae4d5491e3b5bebd211e5c to your computer and use it in GitHub Desktop.
Save ryandejaegher/76414a7d76ae4d5491e3b5bebd211e5c to your computer and use it in GitHub Desktop.
/* Add this code to Design -> Custom CSS */
.arch-style {
/* add your styles here */
}
// 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