For fun, I put a roll of Google-esk barrels on one of my sites.
Everything works fine the first time a selected item is clicked, but after that it does not light up.
I tried .click , .on('click', function() {}) and did not work.
Any ideas on how to fix it and why this is happening?
The main jsFiddle is here
Source code example;
<html> <head> <title> Roll Me </title> <style type="text/css"> </style> <script> $(function() { $('#roll').on('click', function() { $('body').css({ "-moz-animation-name": "roll", "-moz-animation-duration": "4s", "-moz-animation-iteration-count": "1", "-webkit-animation-name": "roll", "-webkit-animation-duration": "4s", "-webkit-animation-iteration-count": "1" }); }); }); </script> </head> <body> <div id="roll"> <h1>click me</h1> </div> </body> </html>
source share