7045Reusing an Animation
- Nov 30 8:23 AMThe animation constructor requires that you pass in an element or id of the element that the animation will apply to. Is it possible to re-use an animation on different elements?
For example, look at the Spotlight design pattern example:
Each time an item is dynamically added, it has a little bit of spotlight applied to it. It seems to me that rather than create a new animation object every time I add something, I should be able to just create one and re-apply it to each new element that is created. Why keep recreating an Animation object when it's doing the same thing over and over again?
It doesn't look like it's possible to re-assign an Animation object though. Is that the case?
- Next post in topic >>