Code coverage report for src\css.js

Statements: 59.09% (13 / 22)      Branches: 30% (3 / 10)      Functions: 33.33% (1 / 3)      Lines: 59.09% (13 / 22)      Ignored: none     

All files » src/ » css.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45  1     1                                 1 1     1 1       1 1 1     1     1 1     1    
 
var internalSwapCall = false;
 
// If this version of jQuery has .swap(), don't false-alarm on internal uses
Iif ( jQuery.swap ) {
	jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) {
		var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get;
 
		if ( oldHook ) {
			jQuery.cssHooks[ name ].get = function() {
				var ret;
 
				internalSwapCall = true;
				ret = oldHook.apply( this, arguments );
				internalSwapCall = false;
				return ret;
			};
		}
	} );
}
 
jQuery.swap = function( elem, options, callback, args ) {
	var ret, name,
		old = {};
 
	Eif ( !internalSwapCall ) {
		migrateWarn( "jQuery.swap() is undocumented and deprecated" );
	}
 
	// 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 || [] );
 
	// Revert the old values
	for ( name in options ) {
		elem.style[ name ] = old[ name ];
	}
 
	return ret;
};