This example shows use of the display property applied to table rows and the visibility property applied to table cells. Each button calls a function that sets the display properties depending on the user's selection.
Displaying cells within a row is dependent on the row being displayed. Accordingly, displaying a cell with an animal's speed will show only if the corresponding row is also displayed.
Note that an embedded style sheet sets the td element's style to {border: 1px solid}.
| Horses | Thoroughbreds | Fast |
| Dogs | Greyhounds | Fast |
| Marsupials | Oppossums | Slow |
[Right-click and choose View Source from the shortcut menu.]
© 2007 Microsoft Corporation. All rights reserved. Terms of use.