Create an Interactive Photo Gallery with jQuery and Dreamweaver

with Chris Converse
please wait ...
Create an Interactive Photo Gallery with jQuery and Dreamweaver
Video duration: 0s 1h 55m Intermediate

Viewers:

In Create an Interactive Photo Gallery with jQuery and Dreamweaver, author Chris Converse develops an interactive photo gallery for a web site using HTML, CSS, and the open-source JavaScript library jQuery. The course begins with tutorials on extracting different-sized images sets from an original photo collection, designing the site layout, and constructing the HTML and CSS. Then, following the progressive enhancement strategy, Chris utilizes JavaScript plug-ins to include lightboxes and other types of interactivity while maintaining backwards compatibility with older browsers and devices. Exercise files accompany the course.

Download a copy of the finished web site here.

Topics include:
  • Preparing gallery photos using Adobe Bridge
  • Adding and linking thumbnail images
  • Creating the layout in HTML and CSS
  • Downloading and adding jQuery to the project
  • Creating preview images from anchor links
  • Implementing the preload functionality
  • Building a customized lightbox with the Fancybox plug-in
  • Styling the zoom and contact links
Subjects:
Developer Photography Web
Software:
Dreamweaver jQuery
Author:

Previewing the project across browsers and devices

- [Voiceover] Hi, I'm Chris Converse and this is a course about creating your own Photo Gallery. I want to start by taking a look at the final project that we're going to be creating. When you download the assets there's going to be a Final Project folder where you can open these files on your web browser and take a look at what the user experience is going to look like once we're done programming this. I'm going to start by taking the index.html file and opening it up in a web browser. So in here I have a series of thumbnails. When the gallery loads automatically the very first image actually fades up over on the right-hand side.

As I move my cursor around the thumbnails I get a little highlight. Clicking on a thumbnail will fade down the particular thumbnail I clicked on, show me a preview image, a slightly larger version of the thumbnail, show me a caption, give me links at the bottom. If I click on the preview we actually load this up in a light box and this is the higher resolution file so there's three versions of each photograph that we're going to be working with. The caption will close up, the picture will load, and then change. We also have a preload set in here so as we click on the items the preview image over on the right-hand side has a jQuery plugin attached to it that will automatically preload the image and then fade it up so we don't have that case where the image just pops on because it started to animate before it preloaded.

The text areas underneath are going to be dynamically created on the right-hand side so the View larger link will also initiate a light box which will overlay the higher resolution file at the top. And this will also give us dynamic captions in the lower left-hand corner as well. On the left-hand side we have an Email link that we can click and initiate an email. And the technologies we're using here, we're using HTMLs, CSS, and JavaScript. To help us with the JavaScript we're going to be using an open source framework called jQuery.

And in addition, we're going to be plugging in two open source frameworks into jQuery, one called FancyBox to do the light box overlays and one called Far In Space to do the preload images. Now one of the advantages of using a framework like this is that we can go across multiple platforms and multiple devices and get the same user experience. Here I'm going to hop over to Windows, I'm going to come down and load the same project in Windows XP all the way back to Internet Explorer 7 and we're going to get the same user experience this far back.

I can click on the different thumbnails, I can click on View image. Now this experience will also work in IE 6, although we won't get some of the transparent effects. So we've got this sort of light drop shadow that we get from FancyBox and this overlay here. Some of that stuff won't show up in IE, they'll just be solid pictures so this will work in IE but it won't be the optimal user experience. And in addition to platforms, let's close out of Mac and Windows here. We can also load this up in mobile devices.

So here we're looking at a version of Android. So in Android, here, I'm going to come into the web browser, going to come up to my favorites. I'm going to load the same files in the Android environment, I'm going to hit Control + F11 to rotate the device. I can tap on an image, I get to fade in and fade out, tap on the full picture. I get the light box that comes up and then lastly, we get the same sort of user experience with the iPad and other tablets, so Android tablets, iPad tablets.

I'll rotate this device, holding Command + right arrow, click on these items, and again activate the light box as well. The other development technique that we're going to use in building this particular project is a technique called Percussive Enhancement. And so what that means is we're going to build the HTML in such a way that even if somebody doesn't have full CSS support or they don't have JavaScript at all the way the HTML's going to be built, they can still go through our Photo Gallery.

So in the Exercise files I have two additional files one's called index_no_js. So I'm going to take this file and load it in a browser. So if somebody visits your site and the don't have JavaScript, so maybe they're using an earlier phone that has a web browser but it doesn't have JavaScript support they can still visit your site, they can click on individual images. These will link over to the high res files and they can simply use their browsers back button or their phone's back button to go back to the main menu. So they can still participate in the Gallery and look at all the photography and they just have a slightly different user experience.

In a case where they might be on a much older mobile device that doesn't have any CSS or JavaScript support this particular code base would look like this. They would just see a series of thumbnails, no styling, no background graphics but, again, each one of these images is linked to its high res file so they can simply just tap or move their control wheel over to the item, click the OK button, and activate each one of these links. So using this progressive enhancement technique we can create a single HTML file with base functionality and then enhance the user experience if they have JavaScript, if they have CSS, and we only build one file.

And then the individual browsers that people visit our Gallery with will then dictate what the full user experience can be based on those particular browsers capabilities. So I hope this sounds interesting to you and if so, let's get started with the first chapter.

please wait ...