Can someone who downvoted arcarda explain their reasoning? I agree that the animation should be in CSS(3), or at least not JS(leaving it out animation entirely might be best).
There are plenty of examples you could show in JS that would better show that it is where logic and behavior is stored. How about setting a textbox or showing an alert?