mak mak - 1 year ago 102
jQuery Question

GSAP Animation of SVG <symbol> does not update <use>

Why, for example animating the

attribute of an element inside a
using TweenMax, has no effect but manipulating it once using jQuery's
function has?

Example Codepen.

Answer Source

AttrPlugin of GSAP is the one that should be used here:

TweenMax.fromTo('symbol > rect', 1, {attr: {fill: 'blue'}}, {attr: {fill: 'red'}});


Further reading:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download