I found this link on how to rotate a div using JQuery.
Rotating a Div Element in jQuery and some more articles too.
The code is as follows
$(function() {
var $elie = $("#wheel");
rotate(0);
function rotate(degree) {
// For webkit browsers: e.g. Chrome
$elie.css({
WebkitTransform : 'rotate(' + degree + 'deg)'
});
// For Mozilla browser: e.g. Firefox
$elie.css({
'-moz-transform' : 'rotate(' + degree + 'deg)'
});
$elie.css({
'-ms-transform' : 'rotate(' + degree + 'deg)'
});
// Animate rotation with a recursive call
setTimeout(function() {
rotate(++degree);
}, 5);
}
});
Could someone please help me to extend this code to Rotating an element clockwise and anticlockwise randomly like a steering wheel