I love playful interaction too, but you can get all this for free: SVGs are natively interactive.
Here's your demo in 45 lines of SVG and CSS: https://codepen.io/paulirish/pen/gbOZXJp