HTML and CSS Reference
In-Depth Information
The getElementsByTagName() method returns a reference to the first img element
in the document and assigns the reference to picture .
The getElementById() method returns a reference to the div element that will hold
the caption for an image.
Every 5 seconds, an image replacement takes place by changing the value assigned
to the src attribute of the image.
Every 5 seconds, the timer will call the startSlideShow() function.
The stopSlideShow() function turns off the timer, allowing the user to stop the
slideshow at any time.
Figure 15.50 A sample of the slideshow thumbnails.
15.10.1 JavaScript Libraries
Although the code used in this topic has been written from scratch, beginning with the
very basic JavaScript, once you get going you might want to download some of the use-
ful and free unobtrusive JavaScript code found in libraries on the Web. See http://Java- for a list of libraries and their links, and for a description of the ten
most popular libraries, go to
works . They are:
1. jQuery
2. Prototype
Search WWH ::

Custom Search