1- define ( [
2- "./core" ,
3- "./var/pnum" ,
4- "./css/var/cssExpand" ,
5- "./css/ var/isHidden" ,
6- "./css/defaultDisplay" ,
7- "./css/support" ,
8- "./css/swap" ,
9- "./selector" , // contains
10- // Optional
11- "./offset"
12- ] , function ( jQuery , pnum , cssExpand , isHidden , defaultDisplay , support ) {
13-
14- var getStyles , curCSS ,
1+ // Require more than a few needed variables
2+ // Keep in mind that a dependency array cannot be used with CommonJS+AMD syntax
3+ define ( function ( require ) {
4+
5+ var
6+ jQuery = require ( "./core" ) ,
7+ pnum = require ( "./var/pnum" ) ,
8+ access = require ( "./core/access" ) ,
9+ cssExpand = require ( "./css/var/cssExpand" ) ,
10+ isHidden = require ( "./css/var/isHidden" ) ,
11+ support = require ( "./css/support" ) ,
12+ defaultDisplay = require ( "./css/ defaultDisplay" ) ,
13+
14+ getStyles , curCSS ,
1515 ralpha = / a l p h a \( [ ^ ) ] * \) / i,
1616 ropacity = / o p a c i t y \s * = \s * ( [ ^ ) ] * ) / ,
1717 rposition = / ^ ( t o p | r i g h t | b o t t o m | l e f t ) $ / ,
18+
1819 // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
1920 // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
2021 rdisplayswap = / ^ ( n o n e | t a b l e (? ! - c [ e a ] ) .+ ) / ,
@@ -31,6 +32,14 @@ var getStyles, curCSS,
3132
3233 cssPrefixes = [ "Webkit" , "O" , "Moz" , "ms" ] ;
3334
35+ // Dependencies not needed as vars
36+ require ( "./css/swap" ) ;
37+ require ( "./core/ready" ) ;
38+ require ( "./selector" ) ; // contains
39+ // Optional
40+ require ( "./offset" ) ;
41+
42+
3443// NOTE: we've included the "window" in window.getComputedStyle
3544// because jsdom on node.js will break without it.
3645if ( window . getComputedStyle ) {
@@ -598,8 +607,8 @@ jQuery.each({
598607
599608jQuery . fn . extend ( {
600609 css : function ( name , value ) {
601- return jQuery . access ( this , function ( elem , name , value ) {
602- var len , styles ,
610+ return access ( this , function ( elem , name , value ) {
611+ var styles , len ,
603612 map = { } ,
604613 i = 0 ;
605614
0 commit comments