aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.slide.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2012-05-14 11:52:47 +0200
committerFelix Nagel <info@felixnagel.com>2012-05-14 11:52:47 +0200
commitc6a8d7ee3c9803d9944db6f55778810592a36452 (patch)
treeabb3df79a0eb6d9bb4713ab73da8ddc60d8a7674 /ui/jquery.effects.slide.js
parent41dfb09aeb5df7d53089b58959d21207de63edbe (diff)
parentd393c8b4cb26ec34878c22202da6ba9393e0094d (diff)
downloadjquery-ui-c6a8d7ee3c9803d9944db6f55778810592a36452.tar.gz
jquery-ui-c6a8d7ee3c9803d9944db6f55778810592a36452.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.effects.slide.js')
-rw-r--r--ui/jquery.effects.slide.js23
1 files changed, 11 insertions, 12 deletions
diff --git a/ui/jquery.effects.slide.js b/ui/jquery.effects.slide.js
index 77d540a9c..ae25a187e 100644
--- a/ui/jquery.effects.slide.js
+++ b/ui/jquery.effects.slide.js
@@ -23,38 +23,37 @@ $.effects.effect.slide = function( o, done ) {
ref = (direction === "up" || direction === "down") ? "top" : "left",
positiveMotion = (direction === "up" || direction === "left"),
distance,
- animation = {},
- size;
+ animation = {};
// Adjust
$.effects.save( el, props );
el.show();
- distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]({
+ distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]({
margin: true
});
-
+
$.effects.createWrapper( el ).css({
overflow: "hidden"
});
-
+
if ( show ) {
el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
}
// Animation
- animation[ ref ] = ( show ?
- ( positiveMotion ? "+=" : "-=") :
+ animation[ ref ] = ( show ?
+ ( positiveMotion ? "+=" : "-=") :
( positiveMotion ? "-=" : "+=")) +
distance;
// Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
+ el.animate( animation, {
+ queue: false,
+ duration: o.duration,
+ easing: o.easing,
complete: function() {
if ( mode === "hide" ) {
- el.hide();
+ el.hide();
}
$.effects.restore( el, props );
$.effects.removeWrapper( el );