By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,299 Members | 813 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,299 IT Pros & Developers. It's quick & easy.

content swap/reval using CSS, <div> & Javascript - HOW???

P: 3
i'm trying to recreate what i *think* should be a simple CSS/JS <div> content reveal / swap.

just like this one ("A Tale of Two Pets", near bottom of page):

http://www.castorpolluxpet.com/our_story

been trying to figure it out on my own for about 2 days now & have run out of ideas.

*** NOTE: my JS skills are currently limited to rollovers & pasting snippets written by "the javascript guy" who used to work in our office.


THANKS!!!
Apr 4 '08 #1
Share this Question
Share on Google+
5 Replies

Stang02GT
Expert 100+
P: 1,208
have you tried to right click on the current page and "view source" to see how they did it?
Apr 4 '08 #2

P: 3
yeah - tried that. they've used an external JS file (a few of them, actually) and even when i open the files, there's so much there - i'm not sure what to pull out....

;(
Apr 5 '08 #3

Stang02GT
Expert 100+
P: 1,208
what is that called? When you click on the pic it changes....if you give me a name of what that function is called i should be able to help ya out.
Apr 5 '08 #4

P: 3
erm, no idea. i really am quite clueless. keep getting an error : "element has not been defined"...but i'm not sure what/how i should define.

all seems to revolve around showing or hiding the appropriate div following a 'click' event. here's a bit of the code:

[HTML]<div id="story1" class="story"><a href="javascript:;" onclick="Element.show('story2');Element.hide('stor y1');"></a>

<a href="javascript:;"onclick="Element.show('story2') ;Element.hide('story1');"></a>

<a href="javascript:;" onclick="Element.show('story2');Element.hide('stor y1');">

<a href="javascript:;" onclick="Element.show('story2');Element.hide('stor y1');"></a>
[/HTML]
thnx
Apr 5 '08 #5

acoder
Expert Mod 15k+
P: 16,027
Moved to the JavaScript forum where you'll get more help.

Moderator.
Apr 8 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.