aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2009-01-14 02:06:04 +0000
committerScott González <scott.gonzalez@gmail.com>2009-01-14 02:06:04 +0000
commit4496146898e0cb632ce876af843b97a6bf9bced0 (patch)
tree3d327fb5c00ac0dafd71c15c70fbd50751307b01
parentee28d263b6ffcf73066d776d5add2726b0fdd282 (diff)
downloadjquery-ui-4496146898e0cb632ce876af843b97a6bf9bced0.tar.gz
jquery-ui-4496146898e0cb632ce876af843b97a6bf9bced0.zip
Fold: Fixed duration.
-rw-r--r--ui/effects.fold.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/effects.fold.js b/ui/effects.fold.js
index 79691605b..d073362c4 100644
--- a/ui/effects.fold.js
+++ b/ui/effects.fold.js
@@ -23,6 +23,7 @@ $.effects.fold = function(o) {
var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
var size = o.options.size || 15; // Default fold size
var horizFirst = !(!o.options.horizFirst); // Ensure a boolean value
+ var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
// Adjust
$.effects.save(el, props); el.show(); // Save & Show
@@ -40,8 +41,8 @@ $.effects.fold = function(o) {
animation2[ref[1]] = mode == 'show' ? distance[1] : 0;
// Animate
- wrapper.animate(animation1, o.duration / 2, o.options.easing)
- .animate(animation2, o.duration / 2, o.options.easing, function() {
+ wrapper.animate(animation1, duration, o.options.easing)
+ .animate(animation2, duration, o.options.easing, function() {
if(mode == 'hide') el.hide(); // Hide
$.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
if(o.callback) o.callback.apply(el[0], arguments); // Callback