I have this cool pause/resume morph animation that I got inspired to do from the new YouTube Embed Player. Anyways, If you load the page you can see the SVG morphing works perfectly fine... and you can change the morph by changing the "from" and "to" attributes in the tag. But what I'm trying to do is edit those attributes with jQuery when ".ytp-play-button" is clicked, but for some reason it is not working, any help?
CODE DEMO: http://codepen.io/mistkaes/pen/jPdWMe
FULL PAGE DEMO: http://s.codepen.io/mistkaes/debug/jPdWMe
jQuery:
$(".ytp-play-button").click(function() {
$("#ytp-12").attr({
"from": "M11,10 L18,13.74 18,22.28 11,26 M18,13.74 L26,18 26,18 18,22.28",
"to": "M11,10 L17,10 17,26 11,26 M20,10 L26,10 26,26 20,26"
});
});