SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    Resident Boozehound simontheak's Avatar
    Join Date
    Jun 2003
    Location
    _root.europe.uk.london
    Posts
    965
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Swapping images (a basic photo gallery)

    I'd really appreciate a bit of help.

    The webpage I have at the moment is a bit like a profile page which contains three pictures in the kind of format as shown below (apologies for the hasty PS skills!)



    What' I'd really like to do is have the two smaller images clickable ... so that when a user clicks on Pic2 for example, it will swap with the main pic so that it can be seen better.

    I think that this should be a fairly simple function. The problem I'm having is that the function will need to be dynamic as it could be any one of the three pictures that are currently in the main position. So how would it be written so that the function checks which picture is currently in the main position and then swaps it with the image that the user has clicked on.

    Does that make any sense at all?

    Thanks so much in advance for your help ...

  2. #2
    code ninja hamstu's Avatar
    Join Date
    Nov 2002
    Location
    Montréal, Canada
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could probably do this with just CSS. Checkout the Photo Gallery demos at Stu's site: http://www.cssplay.co.uk/menu/index.html

  3. #3
    Resident Boozehound simontheak's Avatar
    Join Date
    Jun 2003
    Location
    _root.europe.uk.london
    Posts
    965
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the link hamstu - they look great.

    Just out of interest, is the only way to see the code for the demos by viewing the source? Or am I missing something here?

  4. #4
    code ninja hamstu's Avatar
    Join Date
    Nov 2002
    Location
    Montréal, Canada
    Posts
    375
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, you just view the source. He designed it that way.


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
  •