"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
TIP 103: Fun with ButtonsWho said buttons have to be boring! In Tip 97, you saw how to construct a basic button, and in Tip 98, you learned how to customize the button's appearance. You can also use buttons for visual effects such as showing and hiding content in a document. For example, you may have a street map, and when the user moves the pointer over certain areas on the map an image of a landmark pops up, as in the example in this tip. When the pointer is moved away from the button area, the image disappears. It isn't magicit's interesting programming using a push-button process.
Let's take it one step further. Suppose you want the image to appear in a different location on the page, and at a different size than the original map. No problem. You need two buttons, and actions attached to one button you use as a "hotspot" to make it happen:
|