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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.