Rotate on hover using Jquery
- by Ian34
I can't figure out how to set up a jquery rotate function that would only rotate on hover.
Here is the code that I am using:
$('div.settingsButton').hover(function() {
var angle = 0;
setInterval(function() {
angle += 4;
$(this).rotate(angle);
}, 50);
},
function() {
var angle = 0;
setInterval(function() {
angle = 0;
$(this).rotate(angle);
}, 50);
});
The rotate is a plugin found here:
http://code.google.com/p/jqueryrotate/