18

I tried Googling and couldn't find this, but I imagine it is a fairly simple task. I am trying to get rid of the revert animation (N.B. I want to keep the revert action, just want to remove the animation of it reverting) when you drop from the left side to the right side in this example : http://jsfiddle.net/2fsVZ/

Here is the long and short of what I am looking for:

Below is the JavaScript I am working with - how do I tell it to not animate the revert?

  $( ".before .left-side>div" ).draggable({ revert: true});
matgargano
  • 401
  • 5
  • 15
  • 1
    Please post a portion of your code here in addition to the jsfiddle link. This way if the jsfiddle link is lost the question is still helpful to others. – jholloman Oct 17 '12 at 20:37

1 Answers1

28

You just need to set the revertDuration to 0.

$( ".before .left-side>div" ).draggable({
    revert: true,
    revertDuration: 0
});

http://jsfiddle.net/2fsVZ/2/

http://docs.jquery.com/UI/Draggable#option-revertDuration

jholloman
  • 1,959
  • 14
  • 16