I can not understand how to set up a jquery rotate function which will rotate only on the hover.
Here is the code I am using:
$ ('div.settingsbutton'). Hover (function () {var angle = 0; setInterval (function () {angle + 4; $ (this) .tate (angle);}, 50);}, function () {var angle = 0; set interval ( Function () {angle = 0; $ (this). Rocket (angle);}, 50);}); A rotated plug-in is found here:
The timer function, this is not a DOM element. You must store it in a variable Also, you should use it in your mouseout function. Here is some sample code:
var timer; $ ('Div.settingsButton'). Hover (function () {var angle = 0, $ this = $ (this); timer = setInterval (function () {angle + = 4; $ this.rotate (angle);}, 50);}, function () {Timer & amp; Clear Interval; $ (this). Rookett (0);}); Below is:
Comments
Post a Comment