I have a div that is currently rotated at -35 degrees (as set in the CSS file). I would like to be able to click on it so that it rotates back to 0 degrees.
Here is the code from my Javascript file:
$("div#words").on("click",function(e){
$(this).animate({
"height":"200",
"border-radius":"200"
},{duration:500,step:function(now,fx){
$(this).css("-ms-transform","rotate("+now+"deg)");
$(this).css("-webkit-transform","rotate("+now+"deg)");
$(this).css("transform","rotate("+now+"deg)");
}},function(e){
});
});
Currently, the rotation is about 180 degrees. How can I specify the rotation to a certain degree?