• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 21. Interactivity > Interactive Buttons with JavaScript

21.4. Interactive Buttons with JavaScript

An interactive button, also called a "rollover," changes when the cursor or pointer is positioned over it. By making a button light up (or otherwise call attention to itself), you provide a stronger visual signal that the area is clickable than with a static flat graphic. Rollovers can also be used to pop up a graphic with additional information about the link. Whether it is because rollovers recreate the feel of CD-ROM interfaces or just because they're fun, audiences seem to enjoy the effect.

Rollovers are created by placing a JavaScript in the HTML file with instructions displaying different versions of a graphic based on the position of the mouse. For instance, when the mouse pointer is over graphic "X," the JavaScript runs a function to display the glowing version of the graphic ("glowing X"). JavaScript is discussed further in the next chapter, Chapter 22.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint