diff options
Diffstat (limited to 'ui/jquery.effects.transfer.js')
-rw-r--r-- | ui/jquery.effects.transfer.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ui/jquery.effects.transfer.js b/ui/jquery.effects.transfer.js index 4b4c41050..79b1577d9 100644 --- a/ui/jquery.effects.transfer.js +++ b/ui/jquery.effects.transfer.js @@ -12,10 +12,11 @@ */ (function( $, undefined ) { -$.effects.transfer = function(o) { - return this.queue(function() { - var elem = $(this), - target = $(o.options.to), +$.effects.transfer = function( o ) { + + return this.queue( function() { + var elem = $( this ), + target = $( o.to ), endPosition = target.offset(), animation = { top: endPosition.top, @@ -24,9 +25,9 @@ $.effects.transfer = function(o) { width: target.innerWidth() }, startPosition = elem.offset(), - transfer = $('<div class="ui-effects-transfer"></div>') - .appendTo(document.body) - .addClass(o.options.className) + transfer = $( '<div class="ui-effects-transfer"></div>' ) + .appendTo( document.body ) + .addClass( o.className ) .css({ top: startPosition.top, left: startPosition.left, @@ -34,9 +35,9 @@ $.effects.transfer = function(o) { width: elem.innerWidth(), position: 'absolute' }) - .animate(animation, o.duration, o.options.easing, function() { + .animate( animation, o.duration, o.easing, function() { transfer.remove(); - (o.callback && o.callback.apply(elem[0], arguments)); + $.isFunction( o.complete ) && o.complete.apply(elem[0], arguments); elem.dequeue(); }); }); |