$.isArray() is deprecated

$.bind() is deprecated
$.parseJSON is deprecated
$.unique is deprecated
jQuery .bind() is deprecated
jQuery .unbind() is deprecated
jQuery .load() is deprecated
removed $.support.transition
This commit is contained in:
djmaze 2020-08-07 09:40:36 +02:00
parent bbd9f49dcd
commit 656fd72319
8 changed files with 51 additions and 111 deletions

View file

@ -89,7 +89,7 @@ $.widget = function( name, base, prototype ) {
base = $.Widget;
}
if ( $.isArray( prototype ) ) {
if ( Array.isArray( prototype ) ) {
prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
}
@ -528,7 +528,7 @@ $.Widget.prototype = {
for ( i = 0; i < classes.length; i++ ) {
current = that.classesElementLookup[ classes[ i ] ] || $();
if ( options.add ) {
current = $( $.unique( current.get().concat( options.element.get() ) ) );
current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );
} else {
current = $( current.not( options.element ).get() );
}
@ -557,7 +557,7 @@ $.Widget.prototype = {
_untrackClassesElement: function( event ) {
var that = this;
$.each( that.classesElementLookup, function( key, value ) {
if ( $.inArray( event.target, value ) !== -1 ) {
if ( value.includes(event.target) ) {
that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
}
} );
@ -2333,7 +2333,7 @@ $.widget( "ui.autocomplete", {
_initSource: function() {
var array, url,
that = this;
if ( $.isArray( this.options.source ) ) {
if ( Array.isArray( this.options.source ) ) {
array = this.options.source;
this.source = function( request, response ) {
response( $.ui.autocomplete.filter( array, request.term ) );
@ -3201,7 +3201,7 @@ $.widget( "ui.draggable", $.ui.mouse, {
if ( typeof obj === "string" ) {
obj = obj.split( " " );
}
if ( $.isArray( obj ) ) {
if ( Array.isArray( obj ) ) {
obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
}
if ( "left" in obj ) {
@ -5375,7 +5375,7 @@ $.widget( "ui.sortable", $.ui.mouse, {
if ( typeof obj === "string" ) {
obj = obj.split( " " );
}
if ( $.isArray( obj ) ) {
if ( Array.isArray( obj ) ) {
obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
}
if ( "left" in obj ) {

File diff suppressed because one or more lines are too long