Как то так:
jsfiddle.net/IonDen/o4kbgvoy$(document).ready(function(){
$('#icon').on('click', function(){
var $this = $(this);
if ($this.hasClass('animated')) {
return;
}
$this.addClass('animated');
$this.css("transform","rotate(360deg)");
setTimeout(function () {
$this.removeClass('animated');
$this.css("transform","rotate(0deg)");
}, 800);
});
});
CSS:
#icon{
overflow:hidden;
}
.animated {
-webkit-transition-duration: 0.8s;
-moz-transition-duration: 0.8s;
-o-transition-duration: 0.8s;
transition-duration: 0.8s;
-webkit-transition-property: -webkit-transform;
-moz-transition-property: -moz-transform;
-o-transition-property: -o-transform;
transition-property: transform;
}