e.g. I have a class with display: none; I want to change that class to have
display:block. So every element using that class would change accordingly.
Is this posible?
cheers
dud
var divList = document.getElementsByTagName("div");
for (i=0; i<divList.length; i++) {
if (divList[i].className == "johnson") {
with (divList[i].style ) {
display == "none" ? display = "block" : display = "none";
}
}
}
--
Wired Earp
Wunderbyte
A more intelligent construct (and the whole purpose of the ?: operator) is:
display = (display=="none") ? "block" : "none";
These parenthesis are optional due to precedence rules.
· · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· ·
· PEACE ·
· ·
· Ekevu Cheetah · http://www.felin.com.br · uin: 32125925 ·