Howto rotate image using jquery rotate plugin?

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2008-12-13T22:06:47Z Indexed on 2010/05/01 13:27 UTC
Read the original article Hit count: 826

Filed under:
|
|

How do you rotate an image using jquery (www.jquery.com) rotate plugin (http://code.google.com/p/jquery-rotate/)?

I have tried the following and it doesn't seem to work:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>View Photo</title>
<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/jquery.rotate.1-1.js"></script>
<script type="text/javascript">
var angle = 0;
setInterval ( function (e) {
    rotate();
}, 100 );
function rotate() {
    angle = angle + 1;
    $('#pic').rotate(angle);
}
</script>
</head>
<body>
<img border="0" src="player.gif" name="pic" id="pic">
</body>
</html>

Other methods that are supported by most browsers are wanted too, thanks!

© Stack Overflow or respective owner

Related posts about image

Related posts about rotate