aboutsummaryrefslogtreecommitdiffstats
path: root/ui/effects.fold.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-09-19 14:20:14 +0000
committerScott González <scott.gonzalez@gmail.com>2008-09-19 14:20:14 +0000
commit7c2e7965e90896b3ccf8525aeebfe2b9242203ff (patch)
treeaec37d89461d5d9b14979523f3f82b8b7440f97c /ui/effects.fold.js
parent8d04c3594c4bd56ee2b86068e002b7566359df14 (diff)
downloadjquery-ui-7c2e7965e90896b3ccf8525aeebfe2b9242203ff.tar.gz
jquery-ui-7c2e7965e90896b3ccf8525aeebfe2b9242203ff.zip
Reverted r695.
Diffstat (limited to 'ui/effects.fold.js')
-rw-r--r--ui/effects.fold.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/effects.fold.js b/ui/effects.fold.js
index 148079406..4db29adfa 100644
--- a/ui/effects.fold.js
+++ b/ui/effects.fold.js
@@ -4,7 +4,7 @@
* Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
- *
+ *
* http://docs.jquery.com/UI/Effects/Fold
*
* Depends:
@@ -18,12 +18,12 @@ $.effects.fold = function(o) {
// Create element
var el = $(this), props = ['position','top','left'];
-
+
// Set options
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
-
+
// Adjust
$.effects.save(el, props); el.show(); // Save & Show
var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
@@ -33,12 +33,12 @@ $.effects.fold = function(o) {
var percent = /([0-9]+)%/.exec(size);
if(percent) size = parseInt(percent[1]) / 100 * distance[mode == 'hide' ? 0 : 1];
if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift
-
+
// Animation
var animation1 = {}, animation2 = {};
animation1[ref[0]] = mode == 'show' ? distance[0] : size;
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() {
@@ -47,9 +47,9 @@ $.effects.fold = function(o) {
if(o.callback) o.callback.apply(el[0], arguments); // Callback
el.dequeue();
});
-
+
});
-
+
};
})(jQuery);