S
Sergio del Amo Caballero
I want to access div elemnent and make them visible or invisible with a
condition. They belong to a particular class or not. I was reading the
newsgroup old posting about classname acess and some links and i arrived
to the conclusion that i can not access class Name with Mozilla. With
Explorer i can acesss with document.all.className but i want visualize
my web site in Opera 7.2, Mozilla 1.4 and Explorer 6.0. My code will be
something like this:
if(document.getElementsByTagName("div").className == "node1")
document.getElementsByTagName("div").style.display="none";
I know that the line in the if is in correct. Anybody know how to
implent this to work in the browsers above.
condition. They belong to a particular class or not. I was reading the
newsgroup old posting about classname acess and some links and i arrived
to the conclusion that i can not access class Name with Mozilla. With
Explorer i can acesss with document.all.className but i want visualize
my web site in Opera 7.2, Mozilla 1.4 and Explorer 6.0. My code will be
something like this:
if(document.getElementsByTagName("div").className == "node1")
document.getElementsByTagName("div").style.display="none";
I know that the line in the if is in correct. Anybody know how to
implent this to work in the browsers above.