var is_ie/*@cc_on = { // quirksmode : (document.compatMode==”BackCompat”), version : parseFloat(navigator.appVersion.match(/MSIE (.+?);/)[1]) }@*/; (Uncomment the second line if you also wish to check whether IE is running in “compatibility” (quirks) mode or in standards-mode.) All other browsers cheerfully ignore the Javascript comment block (/* … */) so what they end up with is essentially …
jQuery.fn.rotate = function(angle,whence) { var p = this.get(0); // we store the angle inside the image tag for persistence if (!whence) { p.angle = ((p.angle==undefined?0:p.angle) + angle) % 360; } else { p.angle = angle; } if (p.angle >= 0) { var rotation = Math.PI * p.angle / 180; } else { var rotation = …