diff options
author | Richard Worth <rdworth@gmail.com> | 2008-06-06 19:47:31 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2008-06-06 19:47:31 +0000 |
commit | 4ff130a99523eb4d7131125c9acec6d90c71f721 (patch) | |
tree | 337bff24c201fb128aa34fcb8a28feaffabfe892 /ui/source/effects.transfer.js | |
parent | 42b1860ca77384542eea659afb9ce11f5b30700d (diff) | |
download | jquery-ui-4ff130a99523eb4d7131125c9acec6d90c71f721.tar.gz jquery-ui-4ff130a99523eb4d7131125c9acec6d90c71f721.zip |
effects - whitespace changes, spaces to tabs, newline at EOF
Diffstat (limited to 'ui/source/effects.transfer.js')
-rw-r--r-- | ui/source/effects.transfer.js | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/ui/source/effects.transfer.js b/ui/source/effects.transfer.js index 87c731508..06bdcba3b 100644 --- a/ui/source/effects.transfer.js +++ b/ui/source/effects.transfer.js @@ -1,46 +1,46 @@ ;(function($) { - - $.effects.transfer = function(o) { - return this.queue(function() { +$.effects.transfer = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this); + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode + var target = $(o.options.to); // Find Target + var position = el.offset(); + var transfer = $('<div class="ui-effects-transfer"></div>').appendTo(document.body); + + // Set target css + transfer.addClass(o.options.className); + transfer.css({ + top: position.top, + left: position.left, + height: el.outerHeight(true) - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')), + width: el.outerWidth(true) - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth')), + position: 'absolute' + }); + + // Animation + position = target.offset(); + animation = { + top: position.top, + left: position.top, + height: target.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')), + width: target.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth')) + }; + + // Animate + transfer.animate(animation, o.duration, o.options.easing, function() { + transfer.remove(); // Remove div + if(o.callback) o.callback.apply(el[0], arguments); // Callback + el.dequeue(); + }); + + }); + +}; - // Create element - var el = $(this); - - // Set options - var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode - var target = $(o.options.to); // Find Target - var position = el.offset(); - var transfer = $('<div class="ui-effects-transfer"></div>').appendTo(document.body); - - // Set target css - transfer.addClass(o.options.className); - transfer.css({ - top: position.top, - left: position.left, - height: el.outerHeight(true) - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')), - width: el.outerWidth(true) - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth')), - position: 'absolute' - }); - - // Animation - position = target.offset(); - animation = { - top: position.top, - left: position.top, - height: target.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')), - width: target.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth')) - }; - - // Animate - transfer.animate(animation, o.duration, o.options.easing, function() { - transfer.remove(); // Remove div - if(o.callback) o.callback.apply(el[0], arguments); // Callback - el.dequeue(); - }); - - }); - - }; - })(jQuery); |