diff options
Diffstat (limited to 'src/css.js')
-rw-r--r-- | src/css.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/css.js b/src/css.js index d8aa6d605..106d13ecb 100644 --- a/src/css.js +++ b/src/css.js @@ -137,10 +137,12 @@ jQuery.fn.extend({ return showHide( this ); }, toggle: function( state ) { - var bool = typeof state === "boolean"; + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } return this.each(function() { - if ( bool ? state : isHidden( this ) ) { + if ( isHidden( this ) ) { jQuery( this ).show(); } else { jQuery( this ).hide(); |