nexus site path corrected
[portal.git] / ecomp-portal-FE / client / bower_components / jquery / src / css / var / swap.js
1 define( function() {
2
3 // A method for quickly swapping in/out CSS properties to get correct calculations.
4 return function( elem, options, callback, args ) {
5         var ret, name,
6                 old = {};
7
8         // Remember the old values, and insert the new ones
9         for ( name in options ) {
10                 old[ name ] = elem.style[ name ];
11                 elem.style[ name ] = options[ name ];
12         }
13
14         ret = callback.apply( elem, args || [] );
15
16         // Revert the old values
17         for ( name in options ) {
18                 elem.style[ name ] = old[ name ];
19         }
20
21         return ret;
22 };
23
24 } );