133
rated 0 times
[
139]
[
6]
/ answers: 1 / hits: 30072
/ 12 Years ago, tue, september 11, 2012, 12:00:00
is there any reason this chain does not work? It does not add the class:
document.getElementsByTagName('nav')[0].firstChild.className = current
It should return the first child of the nav element which is an <a>
which does not happen.
Thanks for your help!
More From » javascript