How To Rotate Image In Place With jQuery?

image, jquery, rotation

Solution

I'm providing a jsFiddle that causes the div to rotate after every mouse click.

Essentially, this is from Example 5 of the jqueryrotate.js plugin.

Reference: jsFiddle

Problem

I am trying to make an image rotate in place with each click (the image is an old-fashioned TV knob). I cannot get it to work despite my best efforts. The code is below: ``` var value = 0 $("#img").rotate({ bind: { click: function(){ value +=90; $(this).rotate({ animateTo:value}) } } ``` });

Original source