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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -