This code and animation works perfectly on jQuery 1.4.4 and below, but not on later versions. Could anyone shed some light on this issue and help with a version that works with latest jQuery. I have provided a fiddle below.
The poof effect basically relies on adjusting the background-position to create a css sprite animation, but it borked on new jQuery.
jQuery’s animate is no longer appropriate for sprite animations. I had to roll my own using
setTimeout. The effect is inspired by the one used for removing items from OS X dock.The sprite:
The relevant JS code:
Full working example including HTML and CSS:
http://jsfiddle.net/Y7Ek4/22/