Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Youtube - Play icon morphs into pause icon

Alrighty! I have been trying to nut this one out. I keep hitting dead ends

Any idea how this is done? I have been playing around with adding / removing attributes with JS, but this doesn't work.

I thought they might just toggle the "to" & "from" attributes using JS, but the animate property appears to only work on the initial load.

I have been really interested in learning how to interact with SVG items, but I can't find the right resources anywhere. Maybe there is a framework that specialises in SVG interaction?

I looked at D3, but I feel it might be a bit OTT.

Any suggestions or Pens will be welcomed!

1 Answer

Greensock provides a good way to handle SVG morph animations http://greensock.com/morphSVG