Created
July 5, 2013 14:44
-
-
Save rodcisal/5935024 to your computer and use it in GitHub Desktop.
activar clase de elemento en navigation bar
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
(function activarClase () { | |
aObj = document.getElementById('nav').getElementsByTagName('a'); | |
for(i=0; i< aObj.length; i++) { if (document.location.href.indexOf( aObj[i].href )>=0 ) { aObj[i].parentNode.className = 'mini-bloque activo'; } } | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment