Image rotate to mouse using Jquery and CSS
- by James
I have a compass image and am trying to get the needle to follow the mouse around the page, exactly how the images are rotated in the following demo but without having to shift and click. I'm having trouble breaking down that code however, so any help would be most appreciated. Thanks in advance.
http://www.elated.com/res/File/articles/development/javascript/jquery/smooth-rotatable-images-css3-jquery/
The images are simply wrapped in a div
<div id="content">
<img id="compass" src="compass.png"/>
<img id="needle" src="needle.png"/>
</div>