Create an Interactive Photo Gallery with jQuery and Dreamweaver
Video: Previewing the project across browsers and devicesShows how to develop an interactive photo gallery for a web site using HTML, CSS, and jQuery.
Download a copy of the finished web site here.
- 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
Previewing the project across browsers and devices
Hi! I am 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 in your web browser and take a look at what the user experience is going to look like once we're done programming this. I am 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 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 lightbox 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 plug-in 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.
And in addition we're going to be plugging in two open-source frameworks in the jQuery: one called Fancybox to do the Lightbox 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 am going to hop over to Windows and we're going to come down to 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 effect. So we've got this sort of light drop shadow that we get from Fancybox and this overlay here. Some of that's 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 am going to come in to the web browser. I'm going to come up to my Favorites. I am going to load the same files in the Android environment. I am going to hit Ctrl+F11 to rotate the device. I can tap on an image; I get the fade-in and then fade-out. Tap on the full picture, I get the lightbox that comes up.
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 browser's capabilities. So I hope this sounds interesting to you, and if so, let's get started with the first chapter.
Find answers to the most frequently asked questions about Create an Interactive Photo Gallery with jQuery and Dreamweaver .
Here are the FAQs that matched your search "" :
- Q: The finished state of the interactive photo gallery in this course shows a clickable preview. When you click on the preview image, or on the view larger icon, a larger lightbox image appears. Chris's example has a close button and border surronding the large image, but mine doesn't. Did I miss a step?
- A: The functionality you describe is part of FancyBox plug-in we use in this course. It's a custom lightbox tool, which I've included in the exercise files and also available for download at fancybox.net. It's free and highly customizable.
By default, FancyBox adds a border to images (at least in the version of FancyBox we're using), but there are many options that can be turned on when you set up your fancybox initialization script, including the close button, which is invoked using the showCloseButton property. This is all covered in the "Creating a custom function for lightbox properties" movie.
If you want to customize your gallery further, look at the list of the customizable properties at http://fancybox.net/api.
- Q: This course was updated in April, 2013. What changed?
- A: Since the release of this course, Internet Explorer 9 and 10 have been released, and sometimes these browsers do not activate interactive HTML content. To remedy this problem, the author has added a movie to Chapter 10 that will show you how to:
- Update the HTML to HTML5
- Update the version of jQuery
- Use the Google html5shiv to keep compatibility with Internet Explorer 7 & 8
Sorry, there are no matches for your search "" —to search again, type in another word or phrase and click search.