arthur5005 / jquery.motionnotion

A jQuery plugin which allows for CSS3 animations to occur and complete on core jQuery manipulation and visibility functions such as append, remove, show and hide.
MIT License
6 stars 1 forks source link

How to undo a remove() #1

Closed stevenvachon closed 10 years ago

stevenvachon commented 10 years ago

While it's animating out, what if we want to undo the remove so that it transitions back in?

arthur5005 commented 10 years ago

I've been thinking a lot about this, cancelling a remove. I'm about to issue a major update for this plugin, and I believe my added support for the remaining manipulation functions should add the ability to cancel the remove, just by calling append/insert again on the element.

No guarantees, but I'll write up some test cases to try and support it shortly. Won't be long, just have to sit down for an evening.

stevenvachon commented 10 years ago

Ah, I like the append/insert idea.

arthur5005 commented 10 years ago

Just committed a major update, and a change this morning that does exactly as we discussed. An append/insert during a remove animation will cancel the animation and bring the remove to completion before the append/insert. :)