The animations that I am using on my site (which is developed for iOS) has a simple fade in and fade out using jQ:
$('.loading').fadeOut();
The iPhone, however, is choppy while running these animations. CSS3 animations work much smoother however. How can I fade out the div using jQuery but using CSS3 animations instead of the jQ ones?
This is easier, but once faded out it doesn’t “disappear”, so the page doesn’t reflow once the transition is complete. It’s equivalent to jQuery’s
fadeTo(), notfadeOut();Fade out
Fade in
Delaying execution with Timeout
Delaying execution with .delay
But this is probably best done through the transition delay property in your css:
Or in shorthand: