So my last post was a great success. Plenty of help given, much appreciated. Can hide tags and I can swap them about.
But! A new question I can't believe I didn't think of!! Website is opened for first time, and oh my god!! I got every single div showing up!!
So, how do I get a div to be hidden on first entry? So it only shows up when it is called upon.
This is the script I am using for my divs at the moment.
I am thinking it would need some body onload javascript???Code:<html> <head> <script language="JavaScript" type="text/javascript"> function hide(obj){ document.getElementById(obj).style.visibility="hidden"; } function show(obj){ document.getElementById(obj).style.visibility="visible"; } </script> </head> <body> <a href="#" onclick="hide('div(id)');return false;">hide div(id)</a> <a href="#" onclick="show('div(id)');return false;">show div(id)</a> <span onclick="hide('div2');show('div3');return false;" style="text-decoration:underline;cursor:pointer"> Switch content</span> </body> </html>
Hope someone can help me!!
Thanks in advance.![]()



Reply With Quote

Bookmarks