aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.blind.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.effects.blind.js')
-rw-r--r--ui/jquery.effects.blind.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/ui/jquery.effects.blind.js b/ui/jquery.effects.blind.js
index f1b823533..4ebba4071 100644
--- a/ui/jquery.effects.blind.js
+++ b/ui/jquery.effects.blind.js
@@ -17,17 +17,17 @@ $.effects.blind = function(o) {
return this.queue(function() {
// Create element
- var el = $(this), props = ['position','top','bottom','left','right'];
-
- // Set options
- var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
- var direction = o.options.direction || 'vertical'; // Default direction
+ var el = $(this),
+ props = ['position','top','bottom','left','right'],
+ mode = $.effects.setMode( el, o.mode || 'hide' ),
+ direction = o.direction || 'vertical',
+ ref = (direction == 'vertical') ? 'height' : 'width',
+ wrapper, distance; // Default direction
// Adjust
$.effects.save(el, props); el.show(); // Save & Show
- var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
- var ref = (direction == 'vertical') ? 'height' : 'width';
- var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
+ wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ distance = wrapper[ direction == 'vertical' ? "height" : "width" ]();
if(mode == 'show') wrapper.css(ref, 0); // Shift
// Animation
@@ -35,10 +35,10 @@ $.effects.blind = function(o) {
animation[ref] = mode == 'show' ? distance : 0;
// Animate
- wrapper.animate(animation, o.duration, o.options.easing, function() {
+ wrapper.animate(animation, o.duration, o.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
+ if(o.complete) o.complete.apply(el[0], arguments); // Callback
el.dequeue();
});