All non-var modules should not indent in their AMD wrappers (just for prettier builds). No functionality changes.

This commit is contained in:
Timmy Willison
2013-09-09 11:39:02 -04:00
parent 3b53b75160
commit cd4a9cd7fa
8 changed files with 136 additions and 124 deletions

View File

@@ -2,26 +2,27 @@ define([
"../core"
], function( jQuery ) {
// A method for quickly swapping in/out CSS properties to get correct calculations.
jQuery.swap = function( elem, options, callback, args ) {
var ret, name,
old = {};
// A method for quickly swapping in/out CSS properties to get correct calculations.
jQuery.swap = function( elem, options, callback, args ) {
var ret, name,
old = {};
// Remember the old values, and insert the new ones
for ( name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
}
// Remember the old values, and insert the new ones
for ( name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
}
ret = callback.apply( elem, args || [] );
ret = callback.apply( elem, args || [] );
// Revert the old values
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
// Revert the old values
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
return ret;
};
return ret;
};
return jQuery.swap;
return jQuery.swap;
});