Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2010
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,956
    Thanks
    9
    Thanked 727 Times in 721 Posts
    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.

  • #3
    New Coder
    Join Date
    Jun 2010
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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?


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •