473,413 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

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

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
5 2511
Stang02GT
1,208 Expert 1GB
have you tried to right click on the current page and "view source" to see how they did it?
Apr 4 '08 #2
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
1,208 Expert 1GB
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
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
16,027 Expert Mod 8TB
Moved to the JavaScript forum where you'll get more help.

Moderator.
Apr 8 '08 #6

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

Similar topics

3
by: Paul Thompson | last post by:
When I put a <div ...> inside a <table> specification, functionality is not there. When I put the <table> inside the <div> everything works. Why is that?
2
by: Marcus Otmarsen | last post by:
Ok, the situation is as follows: I defined a <DIV> like: <div id="myid" style="position: absolute; height: 10; width: 10;"><img src="images/object.gif" height=10 width=10></div> This pane is...
2
by: listaction | last post by:
Hi Folks, can you help me by explaining how the code below can be translated using <div> and achieve the same effect? Thanks, LA <html> <body> <table bgcolor="#000000" width="100%"...
9
by: Julia Briggs | last post by:
How do I construct a <iframe> or equivalent for FireFox/NS browsers, inside a screen centered <div> tag? Can it be done?
3
by: Josef K. | last post by:
Asp.net generates the following html when producing RadioButton lists: <td><input id="RadioButtonList_3" type="radio" name="MyRadioButtonList" value="644"...
8
by: Primal-oooze | last post by:
In most newer browsers, would the following methods successfully write to the <div>s below? ------ <script> document.all.div1.innerText = "Some random text."; document.all.div2.innerHTML =...
13
by: Mark | last post by:
Dear folks, In Javascript, is it possible to get all id names within, say, a <div></divpair? Like the array of "document.images", I mean. The reason I ask, is that I have a calender whose...
1
by: menmysql | last post by:
hi to all i want to place a division(using <div> tag) at a perticular location(x,y). is it possible. if possible please tell me how to do it. regards
8
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.