On-Demand Animated GIF Player
Works in modern browsers and IE8+ (no loading spinner or transparent overlay in IE8).
Please view the source of this page for HTML markup, CSS and JS.
Animated GIF courtesy of Stinkdigital's "Share a Coke" project
Requires a static placeholder image and an animated GIF image, saved to the same location and called the same thing (e.g. 'my-animation.png' and 'my-animation.gif').
More demos and snippets
Did you find this useful? There are more demos and code snippets this way.