diff options
Diffstat (limited to 'static/development-bundle/ui/effects.blind.js')
-rw-r--r-- | static/development-bundle/ui/effects.blind.js | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/static/development-bundle/ui/effects.blind.js b/static/development-bundle/ui/effects.blind.js new file mode 100644 index 0000000..62d86ef --- /dev/null +++ b/static/development-bundle/ui/effects.blind.js | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * jQuery UI Effects Blind 1.7.2 | ||
3 | * | ||
4 | * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) | ||
5 | * Dual licensed under the MIT (MIT-LICENSE.txt) | ||
6 | * and GPL (GPL-LICENSE.txt) licenses. | ||
7 | * | ||
8 | * http://docs.jquery.com/UI/Effects/Blind | ||
9 | * | ||
10 | * Depends: | ||
11 | * effects.core.js | ||
12 | */ | ||
13 | (function($) { | ||
14 | |||
15 | $.effects.blind = function(o) { | ||
16 | |||
17 | return this.queue(function() { | ||
18 | |||
19 | // Create element | ||
20 | var el = $(this), props = ['position','top','left']; | ||
21 | |||
22 | // Set options | ||
23 | var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode | ||
24 | var direction = o.options.direction || 'vertical'; // Default direction | ||
25 | |||
26 | // Adjust | ||
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 | ||
32 | |||
33 | // Animation | ||
34 | var animation = {}; | ||
35 | animation[ref] = mode == 'show' ? distance : 0; | ||
36 | |||
37 | // Animate | ||
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 | ||
42 | el.dequeue(); | ||
43 | }); | ||
44 | |||
45 | }); | ||
46 | |||
47 | }; | ||
48 | |||
49 | })(jQuery); | ||