CSS3 transition
by Wang Peng
HTML
<div class="box">click me</div>
CSS
.box {
width: 100px;
height: 100px;
margin: 0 auto;
background-color: #F2F2F2;
transition: all 1s ease-in-out;
}
.active {
transform: rotate(360deg);
background-color: #F29966;
border-radius: 50%;
}
JavaScript
$(".box").on("click", function(){
$(this).toggleClass("active");
})