New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Start learning with our library of video tutorials taught by experts. Get started

Create an Interactive Photo Gallery with jQuery and Dreamweaver
Illustration by

Create an Interactive Photo Gallery with jQuery and Dreamweaver

with Chris Converse

Video: 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.
Expand all | Collapse all
  1. 7m 51s
    1. Previewing the project across browsers and devices
      5m 32s
    2. About the exercise files
      2m 19s
  2. 9m 49s
    1. Renaming a series of files in Adobe Bridge
      3m 7s
    2. Using GREP for more intricate file renaming
      6m 42s
  3. 29m 5s
    1. Creating and linking HTML and CSS files
      1m 32s
    2. Save For Web & Devices in Photoshop
      7m 2s
    3. Creating empty CSS rules
      3m 55s
    4. Create, nest, and class DIV tags
      6m 0s
    5. Adding CSS properties for main container
      4m 0s
    6. Adding CSS properties for content area
      4m 28s
    7. Adding CSS properties for headings
      2m 8s
  4. 15m 55s
    1. Adding and linking the thumbnail images
      2m 32s
    2. Styling the thumbnail links with CSS
      5m 15s
    3. Downloading and adding jQuery to your project
      2m 42s
    4. Overriding the browser's default link behavior
      5m 26s
  5. 11m 10s
    1. Creating preview images from anchor links
      1m 52s
    2. Changing the preview when clicking thumbnails
      5m 59s
    3. Changing the caption when clicking thumbnails
      3m 19s
  6. 12m 0s
    1. Adding an image preload plug-in for jQuery
      2m 22s
    2. Setting a dissolve transition between previews
      4m 31s
    3. Implementing the preload functionality
      5m 7s
  7. 15m 20s
    1. Adding a lightbox plug-in for jQuery
      2m 2s
    2. Creating a custom function for lightbox properties
      7m 38s
    3. Setting links to activate the lightbox feature
      5m 40s
  8. 3m 40s
    1. Initializing the gallery on page load
      3m 40s
  9. 5m 11s
    1. Adding icons and styles to the zoom and contact links
      5m 11s
  10. 2m 41s
    1. Activating a gallery automatically in IE9 and IE10
      2m 41s
  11. 2m 43s
    1. Some ideas for further enhancements
      2m 43s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
Create an Interactive Photo Gallery with jQuery and Dreamweaver
1h 55m Intermediate Apr 27, 2011

Viewers: in countries Watching now:

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 Sharing Photos Web Design Projects Web Development
Software:
Dreamweaver jQuery
Author:
Chris Converse

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.

The text areas underneath are going to be dynamically created on the right-hand side, so the VIEW LARGER link will also initiate a lightbox which will overlay the high-resolution file over 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 HTML, 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 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 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 lightbox as well. The other development technique that we're going to use in building this particular project is a technique called progressive 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 is 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 am going to take this file and load it in a browser. So if somebody visits your site and they 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 browser's 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 the 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 has 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 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.


Expand all | Collapse all
please wait ...
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
 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

join now Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Create an Interactive Photo Gallery with jQuery and Dreamweaver.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Notes cannot be added for locked videos.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.