CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   behavior - change text with picture (http://www.codingforums.com/showthread.php?t=212613)

knightrider01 12-19-2010 06:05 AM

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.

SB65 12-19-2010 09:08 AM

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.

knightrider01 12-30-2010 08:51 PM

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?


All times are GMT +1. The time now is 12:33 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.