mini-pico-tiny convenience micro-framework


/ Published in: JavaScript
Save to your folder(s)

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/)


Copy this code and paste it in your HTML
  1. function $(id) { return document.getElementById(id); }
  2. function html(id, html) { $(id).innerHTML = html; }
  3. function css(id, style) { $(id).style.cssText += style; }
  4. function anim(id, transform, opacity, dur) {
  5. css(id, "-webkit-transition: -webkit-transform, opacity " + (dur||0.5) + "s, " + (dur||0.5) + "s; -webkit-transform: " + transform + "; opacity: " + (opacity||1));
  6. }

URL: http://jsfiddle.net/s73Pu/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.