* jQuery UI Effects Drop 1.12.1
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
//>>description: Moves an element in one direction and hides it at the same time.
//>>docs: http://api.jqueryui.com/drop-effect/
//>>demos: http://jqueryui.com/effect/
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
return $.effects.define( "drop", "hide", function( options, done ) {
direction = options.direction || "left",
ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=",
oppositeMotion = ( motion === "+=" ) ? "-=" : "+=",
$.effects.createPlaceholder( element );
distance = options.distance ||
element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
animation[ ref ] = motion + distance;
element.css( animation );
animation[ ref ] = oppositeMotion + distance;
element.animate( animation, {
duration: options.duration,