Beginning JavaScript With DOM Scripting and Ajax: Second Editon by Russ Ferguson & Christian Heilmann

Beginning JavaScript With DOM Scripting and Ajax: Second Editon by Russ Ferguson & Christian Heilmann

Author:Russ Ferguson & Christian Heilmann [Ferguson, Russ & Heilmann, Christian]
Language: eng
Format: epub
Tags: Computers, Programming Languages, JavaScript, Web, Web Programming
ISBN: 9781430250920
Publisher: Apress
Published: 2013-06-26T04: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.