How Salon's Bug-Eating Script Works

Because Salon's bug-eating piece involves so many pages (see Figure 10-1 for what the page looks like in a browser), the code in Figure 10-21 through Figure 10-23 describes only the frame set and navigation pages. One large difference between the code in these figures and Salon's actual code is that Salon has divided its image map into three separate images to minimize download times. Figure 10-21 through Figure 10-23 assume the site has just one image. To see how the code for handling three separate images differs, look at the scripts available at http://www.bookofjavascript.com/Websites/Salon.

Salon's bug-eating script—frame set

Figure 10-21.  ...

Get The Book of JavaScript, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.