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.cl assName 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.get ElementsByTagNa me("div")[i].className == "node1")
document.getEle mentsByTagName( "div")[i].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.cl assName 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.get ElementsByTagNa me("div")[i].className == "node1")
document.getEle mentsByTagName( "div")[i].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.
Comment