Help with loading images for a very simple image gallery
I'm struggling for ideas of how to create my image gallery, more specifically, how to load a full size image once a thumbnail is pressed.
What I want is obviously when a thumbnail is pressed, jQuery will use AJAX to load the image from the server, and put it into a separate div for displaying. However, I can't work out how to make a generic jQuery function that will take a parameter indicating which image is to be loaded.. Each thumbnail is going to have a unique ID, and I would like to somehow access that, as it will be the same as the name of the full size image on the server. That way I'm hoping I can just pull the ID from the thumbnail, and put it into the complete file directory/file name path of my AJAX code and load the image that way..
Does this make sense? Is it a reasonable way to do it or should I think of some other way?
Any help is very greatly appreciated.
Thanks