title: Rotate on hover using Jquery
body: <p>I can't figure out how to set up a jquery rotate function that would only rotate on hover.</p>
  
  <p>Here is the code that I am using:</p>
  
  <pre><code>$('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);
  });
  </code></pre>
  
  <p>The rotate is a plugin found here:
  <a href="http://code.google.com/p/jqueryrotate/" rel="nofollow">http://code.google.com/p/jqueryrotate/</a></p>