Finished Simple Gallery Demo (if you say “view source” from this screen, you can get all the working code, nothing extraneous added.)
First of all, let’s start off with something as basic as we can. I love making really basic tutorials, and it particularly frustrates me when programmers add unnecessary elements to tutorials that don’t need to be so complicated. The rule here at PyThoughts is generally to keep tutorials like these simple.
The first thing that I did in creating an image gallery was of course adding the JQuery library; simple enough. Then, I designed my basic gallery layout: it has a main image at the top (I put it in a div with a fixed height so that it won’t stretch the page up and down as it changes sizes), and a couple of “thumbnails” in a stream down below. My plan is to make it so that when you click on a thumbnail, it changes the main picture so that you can view it better (duh). 
Continue reading →