Webkit CSS animations for jQuery
Proof of concept
With
Try clicking on the boxes. This calls CSS animation in Webkit and consequently performs better
Without (equivalent to above in non webkit browsers)
This uses normal javascript animation.
Implementation
Uses the following function:
Notes
- Calling $.fn.animate2 rather than $.fn.animate will use CSS animation on Safari and revert to standard JS animation on other browsers
- This is a proof of concept rather than an example of how it should be implemented in jQuery
- Click here to try a stress test
- Issues: Callback implementation is not consistent. No easing support.
- Tested on: Chrome, Firefox 3, iPhone
- Contact: jonah@parkerfox.co.uk. www.parkerfox.co.uk