MCPcopy Create free account
hub / github.com/TruthHun/BookStack / swap

Function swap

static/wangEditor/js/lib/jquery-2.2.1.js:5652–5670  ·  view source on GitHub ↗
( elem, options, callback, args )

Source from the content-addressed store, hash-verified

5650 };
5651
5652var swap = function( elem, options, callback, args ) {
5653 var ret, name,
5654 old = {};
5655
5656 // Remember the old values, and insert the new ones
5657 for ( name in options ) {
5658 old[ name ] = elem.style[ name ];
5659 elem.style[ name ] = options[ name ];
5660 }
5661
5662 ret = callback.apply( elem, args || [] );
5663
5664 // Revert the old values
5665 for ( name in options ) {
5666 elem.style[ name ] = old[ name ];
5667 }
5668
5669 return ret;
5670};
5671
5672
5673var documentElement = document.documentElement;

Callers 1

jquery-2.2.1.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected