Triggering Rollovers from a Link
In earlier examples, the user triggered the rollover by moving the mouse over an image. But you can also make a rollover occur when the user hovers over a text link, as in Figures 4.6 and 4.7. The HTML is an unexciting page with one link and one image, shown in Script 4.6. We’ll do the rollover by modifying the script used in previous examples, as in Script 4.7.
Figure 4.6. The text link is the triggering device for this rollover.
Figure 4.7. When the user points at the link, the graphic below changes.
Get JavaScript and Ajax for the Web: Visual QuickStart Guide, Seventh 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.