aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes/val.js
diff options
context:
space:
mode:
authorManoj Kumar <nithmanoj@gmail.com>2016-08-14 10:54:16 +0000
committerMichał Gołębiowski <m.goleb@gmail.com>2016-11-30 12:22:24 +0100
commit1b9575b9d14399e9426b9eacdd92b3717846c3f2 (patch)
treecb0991e1c7eda7b3b496f52d09b361e8e6425016 /src/attributes/val.js
parent5b4cb0d33731a58384e02ad51e703e7dcb00e424 (diff)
downloadjquery-1b9575b9d14399e9426b9eacdd92b3717846c3f2.tar.gz
jquery-1b9575b9d14399e9426b9eacdd92b3717846c3f2.zip
Core: Deprecate jQuery.isArray
Fixes gh-2961 Closes gh-3278
Diffstat (limited to 'src/attributes/val.js')
-rw-r--r--src/attributes/val.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/attributes/val.js b/src/attributes/val.js
index fbf406929..9245e4e0a 100644
--- a/src/attributes/val.js
+++ b/src/attributes/val.js
@@ -62,7 +62,7 @@ jQuery.fn.extend( {
} else if ( typeof val === "number" ) {
val += "";
- } else if ( jQuery.isArray( val ) ) {
+ } else if ( Array.isArray( val ) ) {
val = jQuery.map( val, function( value ) {
return value == null ? "" : value + "";
} );
@@ -173,7 +173,7 @@ jQuery.extend( {
jQuery.each( [ "radio", "checkbox" ], function() {
jQuery.valHooks[ this ] = {
set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
+ if ( Array.isArray( value ) ) {
return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
}
}