aboutsummaryrefslogtreecommitdiffstats
path: root/src/css
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-09-09 12:07:40 -0400
committerTimmy Willison <timmywillisn@gmail.com>2013-09-09 12:07:40 -0400
commit6bc805971781d0bec97402328f0f21feaaa0a494 (patch)
treeadf355193ade7b07083ebbb302b1d3b7dcfa7919 /src/css
parent2063d6c1896b0c46c39fa0fdecef817f2e6f57c3 (diff)
downloadjquery-6bc805971781d0bec97402328f0f21feaaa0a494.tar.gz
jquery-6bc805971781d0bec97402328f0f21feaaa0a494.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;
});