3 ms·
How about a version that doesn't require jquery, works in Chrome & Safari, and doesn't pollute globally: (function(){ var i = 0, j=15, body = document.querySel
by geuis 15y ago
How about a version that doesn't require jquery, works in Chrome & Safari, and doesn't pollute globally:
(function(){ var i = 0, j=15, body = document.querySelector('body'); setInterval(function(){ i = i+0.1; if (j>0) j = j-0.05;body.style.webkitTransform = 'rotate('+j*Math.sin(i)+'deg)';}, 100);})();