diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2015-10-09 15:52:29 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2015-10-18 12:30:00 -0400 |
commit | 67d7a2eefee768b59eb3d51cb1fb2c671873e58a (patch) | |
tree | 50f099cedd0c00039f80209e8aaa1e13ccc5ae14 /src/css.js | |
parent | e271f665dd8fb617a5015051e1c9df8cebd6c97b (diff) | |
download | jquery-67d7a2eefee768b59eb3d51cb1fb2c671873e58a.tar.gz jquery-67d7a2eefee768b59eb3d51cb1fb2c671873e58a.zip |
CSS: Make show/hide/toggle methods a module
Unit test changes some uses of .show() and .hide() to .css( "display", ... ),
there was already an implicit assumption in several of the existing tests.
Fixes gh-2193
Close gh-2648
Diffstat (limited to 'src/css.js')
-rw-r--r-- | src/css.js | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/src/css.js b/src/css.js index ccf0cc85e..3ab0d2f01 100644 --- a/src/css.js +++ b/src/css.js @@ -14,13 +14,12 @@ define( [ "./css/adjustCSS", "./css/addGetHookIf", "./css/support", - "./css/showHide", "./core/init", "./core/ready", "./selector" // contains ], function( jQuery, pnum, access, rmargin, document, rcssNum, rnumnonpx, cssExpand, - isHidden, getStyles, swap, curCSS, adjustCSS, addGetHookIf, support, showHide ) { + isHidden, getStyles, swap, curCSS, adjustCSS, addGetHookIf, support ) { var @@ -401,25 +400,6 @@ jQuery.fn.extend( { jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); } } ); |