Yeah they will be set to display:none in my CSS file. I was looking for example online and they all had the divs set to display:none, but I just couldn't understand what the code was doing or how it worked. I figured setting it to display:none would be the logical thing to do though since.
Now the thing is, when "home" is clicked, only the "home" HTML should be shown, and the rest should be hidden. Etc. will the code you gave me do that? I will give it a try after I get off work today.
Yes, it will, assuming all of them start with a style of none.
Probably you will want to show one of them by default, so call show('home'); at the end of the script as well so that it's the one that is shown when the page is first loaded. Here's an edited script for you that will show home by default:
But how would I set that up using the onClick() command to hide the div? I'm assuming I can't just copy and past the original code and switch the var to something different because the function is still show().
I want it to work the same way as with the original code, just when the button it clicked, the div will be set to display:none;
I am going to keep trying to figure this out myself because I feel like a free-loader haha
EDIT: Got it! onclick="hide('div');hide('div');"
Last edited by Mike Anthony; 04-10-2012 at 10:16 PM.