diff options
author | Jason Bedard <jason+github@jbedard.ca> | 2017-12-12 22:43:30 -0800 |
---|---|---|
committer | Jason Bedard <jason+github@jbedard.ca> | 2018-01-15 09:26:19 -0800 |
commit | 3d732cca6b5076a9d13eee98e2b075b37384cd91 (patch) | |
tree | 7ad2375d276c212e7d252554b3f87e5b0b3bec5e /src/attributes/classes.js | |
parent | 6c38ebbd47c6b0fa654733819bd5ae36c1ac6c48 (diff) | |
download | jquery-3d732cca6b5076a9d13eee98e2b075b37384cd91.tar.gz jquery-3d732cca6b5076a9d13eee98e2b075b37384cd91.zip |
Core: deprecate jQuery.isFunction
Fixes gh-3609
Diffstat (limited to 'src/attributes/classes.js')
-rw-r--r-- | src/attributes/classes.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/attributes/classes.js b/src/attributes/classes.js index 1c75821b2..0c90a8dff 100644 --- a/src/attributes/classes.js +++ b/src/attributes/classes.js @@ -1,10 +1,11 @@ define( [ "../core", "../core/stripAndCollapse", + "../var/isFunction", "../var/rnothtmlwhite", "../data/var/dataPriv", "../core/init" -], function( jQuery, stripAndCollapse, rnothtmlwhite, dataPriv ) { +], function( jQuery, stripAndCollapse, isFunction, rnothtmlwhite, dataPriv ) { "use strict"; @@ -27,7 +28,7 @@ jQuery.fn.extend( { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; - if ( jQuery.isFunction( value ) ) { + if ( isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); } ); @@ -64,7 +65,7 @@ jQuery.fn.extend( { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; - if ( jQuery.isFunction( value ) ) { + if ( isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); } ); @@ -113,7 +114,7 @@ jQuery.fn.extend( { return stateVal ? this.addClass( value ) : this.removeClass( value ); } - if ( jQuery.isFunction( value ) ) { + if ( isFunction( value ) ) { return this.each( function( i ) { jQuery( this ).toggleClass( value.call( this, i, getClass( this ), stateVal ), |