Skip to content

Instantly share code, notes, and snippets.

@fflorent
Created March 20, 2012 12:37
Show Gist options
  • Save fflorent/2134780 to your computer and use it in GitHub Desktop.
Save fflorent/2134780 to your computer and use it in GitHub Desktop.
click and rotate
document.body.addEventListener("click", function(ev)
{
var el = ev.originalTarget;
el.style.MozTransition = "3s";
el.style.MozTransform = "rotate(360deg)";
});
document.body.addEventListener("transitionend", function(ev){
var el = ev.originalTarget;
el.style.MozTransition = "0s";
el.style.MozTransform="";
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment