Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-19-2010, 06:05 AM   PM User | #1
knightrider01
New Coder

 
Join Date: Jun 2010
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
knightrider01 is an unknown quantity at this point
behavior - change text with picture

On this page, I have the right-hand side pictures connected to the main left picture with a behavior, so that when you click on the small thumbnail picture on the right the appropriate larger picture on the left appears.

Is there a way to make the text in the middle change when the larger picture changes as well? Maybe another behavior? Can you have one action (a click on a small thumbnail) affect two areas (the larger picture plus the text)? Each text group will need to have its own link to a specific url.

Last edited by knightrider01; 12-19-2010 at 06:07 AM..
knightrider01 is offline   Reply With Quote
Old 12-19-2010, 09:08 AM   PM User | #2
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,827
Thanks: 9
Thanked 685 Times in 679 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
Yes. All you're doing on the images, with javascript, is changing the src attribute of the large image. In a similar way you can change the content of your <p> tag (the innerHTML). Have a look here for an introduction.
SB65 is offline   Reply With Quote
Old 12-30-2010, 08:51 PM   PM User | #3
knightrider01
New Coder

 
Join Date: Jun 2010
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
knightrider01 is an unknown quantity at this point
I'm not sure I understand the tutorial you linked to. Can you either explain it more or is there another easier way to do it?
knightrider01 is offline   Reply With Quote
Reply

Bookmarks

Tags
behavior, on click, picture, text, thumbnail

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:58 AM.


Advertisement
Log in to turn off these ads.