aboutsummaryrefslogtreecommitdiffstats
path: root/src/css
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-09-09 11:39:02 -0400
committerTimmy Willison <timmywillisn@gmail.com>2013-09-09 12:08:00 -0400
commitcd4a9cd7fa7093df92e64d5da9f18742254a8ca7 (patch)
treea08288e1726e9b5a424e7ef9dac6769dc3a4e268 /src/css
parent3b53b75160606610cc8f87404f89fc9e10441c4b (diff)
downloadjquery-cd4a9cd7fa7093df92e64d5da9f18742254a8ca7.tar.gz
jquery-cd4a9cd7fa7093df92e64d5da9f18742254a8ca7.zip
All non-var modules should not indent in their AMD wrappers (just for prettier builds). No functionality changes.
Diffstat (limited to 'src/css')
-rw-r--r--src/css/swap.js35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/css/swap.js b/src/css/swap.js
index 07a661c03..ce1643531 100644
--- a/src/css/swap.js
+++ b/src/css/swap.js
@@ -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;
});