New site design and a question!

I've been bored with the wordpress theme I was using, and have been meaning to redo my site... so I finally worked on it today.

I was really admiring Tamaelia's site today. I like how the different content is in one file, but gets swapped out when you chose the different links (I hope that made sense, because I really don't know how to say what I'm trying to say :P). I've been searching javascript tutorials and haven't really found quite what I am looking for. If anyone could point me in the direction of a good tut I'd really appreciate it!

Vex 15 years ago
Oh Merreck that is looking great!

The way I did Tam's site, is i lined up a bunch of Divs that were set to display: none



and then i used this very simple script:

function swapContent(arg1,arg2) {
document.getElementById(arg1).innerHTML = document.getElementById(arg2).innerHTML;
document.getElementById(arg1).style.display = '';
document.getElementById(arg2).style.display = 'none';

so a link would be
About Me[/HTML]

'maincontent' would be where you want the content to go, and 'aboutme' would be your hidden div... make sense?
Adiene 15 years ago
I LOVE the new look =D *bounces
Vex 15 years ago
You don't have to use PHP includes, just enter in the content in the proper div.

its late. i blame Adi for keeping me up so late!
Merreck 15 years ago
Thanks ladies!

I went ahead and used PHP includes because that made the most sense to me (especially after I figured out to change my index file to PHP, duh :P). My only problem now is that it works in Firefox but not IE hehe.
Adiene 15 years ago
It's always my fault * Spam PMs Vex again for good measure~!
FyreGarnett 15 years ago
ROFL - a site that works in FF but nor IE - I love it!!! wonder if it works in Opera....

I love the new look Merreck! very elegant!
Verileah 15 years ago
This happens all the time because Firefox is standards compliant and IE isn't. Bastards.

Nice site design Merreck, and Vex I'm tempted to steal that code for something completely different...I think it's cleaner than the thing I was doing .
Vex 15 years ago
hey i didn't invent it, go ahead and grab it !
Merreck 15 years ago
Yay! I got it to work by changing the div id names slightly and now it works in both IE and Firefox /happy dance.

Thanks for the comments and code help!
Vex 15 years ago
sweet =) great work! I totally love the background. those patterns are so nice. I have no idea where to get them though hehe
Merreck 15 years ago
Thanks! I have no idea where I got the background... most likely from istockphoto. I found it the other day when I was looking through past versions of my website trying to find where I saved the formmail script (so organized, I know!). :P
Vex 15 years ago
i give up trying to find old copies of files, i just redownload it every time i need it
patslash 15 years ago
great website!
ROzbeans 15 years ago
I ran my mouse over the sliced images you have and was hoping they'd turn to color for some reason. That would be a really cool effect, I think, to add! =D Superb as always, Merreck!
Merreck 15 years ago
That's a really neat idea!
tamaelia 15 years ago
Thank god Vex has all the answers.. cos I have been so pathetically lame at learning how to do this stuff. I love your site Merreck nice work and props to you for actually making the effort to learn it instead of being pathetic like me. I like to think I am doing my part to keep starving artists fed !! *hugs Vex again*
Vex 15 years ago
food? who needs food? i have a poser addiction to feed
tamaelia 15 years ago
Well of course I meant food in the figurative sense... feeding a runtime is a fulltime job!