Html to load hidden div with html 5 animation

Hi, I have two Html 5 banners, one is just a bouncing ball second is a animated character. what i want is when someone click 1st animation (ball) to load the 2nd animation from the beginning. when i used “function on load” method the animation is already played in the second one. is there a way to tel that second animation to play it from beginning. im using below method.

Can you share the code you are using to play the second animation?