diff options
Diffstat (limited to 'bower_components/jquery/src/css/var')
| -rw-r--r-- | bower_components/jquery/src/css/var/cssExpand.js | 4 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/var/isHidden.js | 9 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/var/rmargin.js | 6 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/var/rnumnonpx.js | 4 | ||||
| -rw-r--r-- | bower_components/jquery/src/css/var/swap.js | 24 |
5 files changed, 37 insertions, 10 deletions
diff --git a/bower_components/jquery/src/css/var/cssExpand.js b/bower_components/jquery/src/css/var/cssExpand.js index 91e90a8..9f8194d 100644 --- a/bower_components/jquery/src/css/var/cssExpand.js +++ b/bower_components/jquery/src/css/var/cssExpand.js @@ -1,3 +1,3 @@ -define(function() { +define( function() { return [ "Top", "Right", "Bottom", "Left" ]; -}); +} ); diff --git a/bower_components/jquery/src/css/var/isHidden.js b/bower_components/jquery/src/css/var/isHidden.js index 15ab81a..7997eff 100644 --- a/bower_components/jquery/src/css/var/isHidden.js +++ b/bower_components/jquery/src/css/var/isHidden.js @@ -1,13 +1,16 @@ -define([ +define( [ "../../core", "../../selector" + // css is assumed ], function( jQuery ) { return function( elem, el ) { + // isHidden might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); + return jQuery.css( elem, "display" ) === "none" || + !jQuery.contains( elem.ownerDocument, elem ); }; -}); +} ); diff --git a/bower_components/jquery/src/css/var/rmargin.js b/bower_components/jquery/src/css/var/rmargin.js index da0438d..9be2212 100644 --- a/bower_components/jquery/src/css/var/rmargin.js +++ b/bower_components/jquery/src/css/var/rmargin.js @@ -1,3 +1,3 @@ -define(function() { - return (/^margin/); -}); +define( function() { + return ( /^margin/ ); +} ); diff --git a/bower_components/jquery/src/css/var/rnumnonpx.js b/bower_components/jquery/src/css/var/rnumnonpx.js index c93be28..ed13f0b 100644 --- a/bower_components/jquery/src/css/var/rnumnonpx.js +++ b/bower_components/jquery/src/css/var/rnumnonpx.js @@ -1,5 +1,5 @@ -define([ +define( [ "../../var/pnum" ], function( pnum ) { return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); -}); +} ); diff --git a/bower_components/jquery/src/css/var/swap.js b/bower_components/jquery/src/css/var/swap.js new file mode 100644 index 0000000..b6d3b67 --- /dev/null +++ b/bower_components/jquery/src/css/var/swap.js @@ -0,0 +1,24 @@ +define( function() { + +// A method for quickly swapping in/out CSS properties to get correct calculations. +return 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 ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + +} ); |
