/ Published in: JavaScript
via [http://mir.aculo.us/2010/06/04/making-an-ipad-html5-app-making-it-really-fast/](http://mir.aculo.us/2010/06/04/making-an-ipad-html5-app-making-it-really-fast/)
for CSS3 Transitions, Transforms, Animation also see:
[http://css3.bradshawenterprises.com/](http://css3.bradshawenterprises.com/)
for CSS3 Transitions, Transforms, Animation also see:
[http://css3.bradshawenterprises.com/](http://css3.bradshawenterprises.com/)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function $(id) { return document.getElementById(id); } function html(id, html) { $(id).innerHTML = html; } function css(id, style) { $(id).style.cssText += style; } function anim(id, transform, opacity, dur) { css(id, "-webkit-transition: -webkit-transform, opacity " + (dur||0.5) + "s, " + (dur||0.5) + "s; -webkit-transform: " + transform + "; opacity: " + (opacity||1)); }
URL: http://jsfiddle.net/s73Pu/