2
* jQuery UI Effects Transfer @VERSION
4
* Copyright (c) 2008 Aaron Eisenberger (aaronchi@gmail.com)
5
* Dual licensed under the MIT (MIT-LICENSE.txt)
6
* and GPL (GPL-LICENSE.txt) licenses.
8
* http://docs.jquery.com/UI/Effects/Transfer
15
$.effects.transfer = function(o) {
17
return this.queue(function() {
23
var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
24
var target = $(o.options.to); // Find Target
25
var position = el.offset();
26
var transfer = $('<div class="ui-effects-transfer"></div>').appendTo(document.body);
27
if(o.options.className) transfer.addClass(o.options.className);
30
transfer.addClass(o.options.className);
34
height: el.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
35
width: el.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth')),
40
position = target.offset();
44
height: target.outerHeight() - parseInt(transfer.css('borderTopWidth')) - parseInt(transfer.css('borderBottomWidth')),
45
width: target.outerWidth() - parseInt(transfer.css('borderLeftWidth')) - parseInt(transfer.css('borderRightWidth'))
49
transfer.animate(animation, o.duration, o.options.easing, function() {
50
transfer.remove(); // Remove div
51
if(o.callback) o.callback.apply(el[0], arguments); // Callback