Last active
June 17, 2016 14:10
-
-
Save rafaelmv/787631d4e58e0228ad4f 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
var menu = document.getElementsByClassName("your-elements"); | |
for(var i = 0; i < menu.length; i++){ | |
if(menu[i].getAttribute("href") == window.location.pathname){ | |
menu[i].id = "devf-selected-menu" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment