title: jquery drag and rotate to angle
body: <p>I am using jQuery UI to drag and drop an image. I also want to rotate the image 360 degrees so I can move and rotate it like in Photoshop. I am using the <a href="http://code.google.com/p/jqueryrotate/" rel="nofollow">jQuery rotate plugin</a> to rotate the image on click, but I want to select a corner and drag to rotate the image to any angle.</p>
  
  <p>Live JS: <a href="http://jsfiddle.net/87jaR/" rel="nofollow">http://jsfiddle.net/87jaR/</a></p>
  
  <p>JavaScript code:</p>
  
  <pre><code>var test = 5;
  $(function() 
  {
      $('#rotate').draggable({ containment: 'frame' });
      $('#frame img').live('mousedown', function(event) 
      {
          test = test + 15;
          $(this).rotate({ angle: test });
      });
  });
  </code></pre>