Using the set Element

Now comes the fun part. One of the most basic animation and interaction elements is the set element. The set element doesn't so much animate items as it explicitly changes their attributes. As such, it provides a perfect example of basic interaction.

Taking advantage of what you learned with timing and event triggers in the last hour, you can use the set element to modify elements or groups in a number of ways. For example, you can make an item disappear, flip over, change color, change position, and more.

The set element uses several common attributes to operate. These are detailed in Table 13.1.

Table 13.1. set Element Attributes
set Attribute Attribute Function
xlink:href Similar to the use element, set usually relies ...

Get Sams Teach Yourself SVG in 24 Hours now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.