Results 1 to 2 of 2

Thread: swap to next picture, how?

  1. #1
    Join Date
    Sep 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default swap to next picture, how?

    I have a little button that says "next" below a big image, letīs call it "image1", when I press the button I want to swap the big image to "image2". And then if I press it again I want it to swap to "image3" and the next time to "image4" and so on.

    Iīm not so good at javascripts but I found a script that can make the button swap "image1" to "image2" when I click it, but the problem comes when I want the same button to swap "image2" to "image3" etc...

    Does anyone have a tip?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Show us your code and markup for doing the swap. Or (if this makes sense to you), add an array of the images you wish to use and call each image by its index in the array incrementing the index call value each time an image is swapped.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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