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 2 of 2

Thread: Image changer

  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Image changer

    I may be too close to this to see the answer but i have an image viewer with one big image and lots of little ones. What i need is that when you click on one of the smaller ones it grabs it's image src and sets the larger photo to that src. The small images are dynamic but the larger image will have a static id.

  • #2
    Senior Coder Logic Ali's Avatar
    Join Date
    Sep 2010
    Location
    London
    Posts
    1,028
    Thanks
    0
    Thanked 207 Times in 202 Posts
    Each thumbnail image needs an onclick handler like this:

    Code:
    function(){ document.getElementById( 'myBigImage' ).src = this.src;  }


  •  

    Posting Permissions

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