Beginning JavaScript with DOM Scripting and Ajax, Second Edition by Christian Heilmann & Russ Ferguson

Beginning JavaScript with DOM Scripting and Ajax, Second Edition by Christian Heilmann & Russ Ferguson

Author:Christian Heilmann & Russ Ferguson [Christian Heilmann]
Language: eng
Format: epub
Tags: JavaScript
Publisher: Apress
Published: 2013-06-25T21:00:00+00:00


Figure 6-9 . A slide show with small preview images (thumbnails)

Visitors without JavaScript will get only a row of images linking to larger images, as shown in Figure 6-10.

Figure 6-10. The slide show with small preview images without JavaScript

Again, let’s plan the skeleton of the script: you define a class to recognize which lists are to become slide shows, a class to give to the list item that contains the large photo, and alternative text to add to the large photo.

The methods are the same as the last time: one global initialization method, one method to initialize each slide show, and one method to show the current photo.

miniSlides.js (skeleton)

minislides = {

// CSS classes

triggerClass : 'minislides',

largeImgClass : 'photo',

// Text added to the title attribute of the big picture

alternativeText : 'large view',



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.