A bit late, but I wrote the code for this.
http://jsfiddle.net/73DzT/139/
Object.prototype.rotate = function(d) { var s = "rotate(" + d + "deg)"; if (this.style) { // regular DOM Object this.style.MozTransform = s this.style.WebkitTransform = s; this.style.OTransform = s; this.style.MSTransform = s; this.style.transform = s; } else if (this.css) { // JQuery Object this.css("-moz-transform", s); this.css("-webkit-transform", s); this.css("-o-transform", s); this.css("-ms-transform", s); this.css("transform", s); } this.setAttribute("rotation", d); }
can be used with regular objects or with jQuery objects. and saves an attribute called βrotationβ to give you the current rotation value.
source share