@@ -12,14 +12,14 @@ define([
1212 "./css/adjustCSS" ,
1313 "./css/addGetHookIf" ,
1414 "./css/support" ,
15- "./data/var/dataPriv " ,
15+ "./css/showHide " ,
1616
1717 "./core/init" ,
1818 "./css/swap" ,
1919 "./core/ready" ,
2020 "./selector" // contains
2121] , function ( jQuery , pnum , access , rmargin , rcssNum , rnumnonpx , cssExpand , isHidden ,
22- getStyles , curCSS , adjustCSS , addGetHookIf , support , dataPriv ) {
22+ getStyles , curCSS , adjustCSS , addGetHookIf , support , showHide ) {
2323
2424var
2525 // Swappable if display is none or starts with table
@@ -150,46 +150,6 @@ function getWidthOrHeight( elem, name, extra ) {
150150 ) + "px" ;
151151}
152152
153- function showHide ( elements , show ) {
154- var display , elem ,
155- values = [ ] ,
156- index = 0 ,
157- length = elements . length ;
158-
159- // Determine new display value for elements that need to change
160- for ( ; index < length ; index ++ ) {
161- elem = elements [ index ] ;
162- if ( ! elem . style ) {
163- continue ;
164- }
165-
166- display = elem . style . display ;
167- if ( show ) {
168- if ( display === "none" ) {
169- // Restore a pre-hide() value if we have one
170- values [ index ] = dataPriv . get ( elem , "olddisplay" ) || "" ;
171- }
172- } else {
173- if ( display !== "none" ) {
174- values [ index ] = "none" ;
175-
176- // Remember the value we're replacing
177- dataPriv . set ( elem , "olddisplay" , display ) ;
178- }
179- }
180- }
181-
182- // Set the display of the elements in a second loop
183- // to avoid the constant reflow
184- for ( index = 0 ; index < length ; index ++ ) {
185- if ( values [ index ] != null ) {
186- elements [ index ] . style . display = values [ index ] ;
187- }
188- }
189-
190- return elements ;
191- }
192-
193153jQuery . extend ( {
194154
195155 // Add in style property hooks for overriding the default
0 commit comments