hello, i want to change the 'display' in a css file. basically, i have two classes in a css file, 'Parent' and 'sub'. i would like to make a script that when you click a link in class 'parent' then a specified link(s) in class sub would become visible. any ideas? -Regards CONTE
Hi, try this one <html> <head> <title>Show/Hide ID</title> <script language=javascript> function showhide(id) { if(id == "sub") { document.getElementById('sub_yes').style.display = "none"; document.getElementById('sub_no').style.display = "block"; } else { document.getElementById('sub_yes').style.display = "block"; document.getElementById('sub_no').style.display = "none"; } } </script> </head> <body> <a href="javascript:showhide('sub')" id="sub_yes"> Parent</a> <br> <a href="javascript:showhide('other')" id="sub_no" style="display:none"> Subitems</a> </body> </html> Code (markup):