What I have:
Using jQuery UI, I’m dragging/dropping a div from one div to another.
The dropping event triggers:
- An animation that eases/snaps the dropped div into place.
- The toggling (show/hide) of yet another div.
The problem:
The toggling occurs before the animation is complete. I need the toggling to occur AFTER the animation completes.
Live example + code:
http://jsfiddle.net/dominornovus/3Hq3q/2/
What I’ve tried:
I’ve unsuccessfully attempted use of an animated selector:
$(":animated").promise().done(function() {
//code here
}
My question:
How do I prevent the toggle occurring before the droppable animation.
Use the callback in
animate():FIDDLE