0149ed787c648e23abd2eb143f3f023a32462cb0
2 * jQuery UI Effects Blind 1.8.22
4 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
5 * Dual licensed under the MIT or GPL Version 2 licenses.
6 * http://jquery.org/license
8 * http://docs.jquery.com/UI/Effects/Blind
11 * jquery.effects.core.js
13 (function( $, undefined ) {
15 $.effects
.blind = function(o
) {
17 return this.queue(function() {
20 var el
= $(this), props
= ['position','top','bottom','left','right'];
23 var mode
= $.effects
.setMode(el
, o
.options
.mode
|| 'hide'); // Set Mode
24 var direction
= o
.options
.direction
|| 'vertical'; // Default direction
27 $.effects
.save(el
, props
); el
.show(); // Save & Show
28 var wrapper
= $.effects
.createWrapper(el
).css({overflow
:'hidden'}); // Create Wrapper
29 var ref
= (direction
== 'vertical') ? 'height' : 'width';
30 var distance
= (direction
== 'vertical') ? wrapper
.height() : wrapper
.width();
31 if(mode
== 'show') wrapper
.css(ref
, 0); // Shift
35 animation
[ref
] = mode
== 'show' ? distance
: 0;
38 wrapper
.animate(animation
, o
.duration
, o
.options
.easing
, function() {
39 if(mode
== 'hide') el
.hide(); // Hide
40 $.effects
.restore(el
, props
); $.effects
.removeWrapper(el
); // Restore
41 if(o
.callback
) o
.callback
.apply(el
[0], arguments
); // Callback