javascript - Animation on jQuery only executes one time -
i trying make funny function rotates element 360. problem executes first time , don't know why!
jquery.fn.circularfun = function() { this.stop().animate( {rotation: 360}, { duration: 500, step: function(now, fx) { $(this).css({"transform": "rotate("+now+"deg)"}); } } ); }
thanks!!
after first rotation, have been rotated 360
. need set 0
after you're finished.
Comments
Post a Comment