Rotate image clockwise or anticlockwise inside a div using javascript

rahul picture rahul · Jun 9, 2009 · Viewed 52.1k times · Source

HI, Is there a way by which I can rotate an image inside a div clockwise or anticlockwise.

I have a main fixed width div[overflow set to hidden] with images loaded from database. There is a scroll bar for showing the images inside the div. When image is clicked then I need to show the rotating animation either in clockwise or anticlockwise direction.

I have done it using Matrix filter. I would like to know whether it is possible to be done in IE only without using any filters.

Answer

Derek picture Derek · Jun 10, 2009

try this: http://raphaeljs.com/image-rotation.html

uses canvas but also supports IE