Skip to content

Commit c4b1f3a

Browse files
committed
fix jQuery Migrate deprecation warnings
resolve #1
1 parent 649f0bd commit c4b1f3a

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

jquery-ui.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ $.widget = function( name, base, prototype ) {
8080
}
8181

8282
// Create selector for plugin
83-
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
83+
$.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) {
8484
return !!$.data( elem, fullName );
8585
};
8686

@@ -514,7 +514,7 @@ $.Widget.prototype = {
514514
for ( i = 0; i < classes.length; i++ ) {
515515
current = that.classesElementLookup[ classes[ i ] ] || $();
516516
if ( options.add ) {
517-
current = $( $.unique( current.get().concat( options.element.get() ) ) );
517+
current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );
518518
} else {
519519
current = $( current.not( options.element ).get() );
520520
}
@@ -1246,7 +1246,7 @@ var position = $.ui.position;
12461246
//>>docs: http://api.jqueryui.com/data-selector/
12471247

12481248

1249-
var data = $.extend( $.expr[ ":" ], {
1249+
var data = $.extend( $.expr.pseudos, {
12501250
data: $.expr.createPseudo ?
12511251
$.expr.createPseudo( function( dataName ) {
12521252
return function( elem ) {
@@ -1361,7 +1361,7 @@ function visible( element ) {
13611361
return visibility !== "hidden";
13621362
}
13631363

1364-
$.extend( $.expr[ ":" ], {
1364+
$.extend( $.expr.pseudos, {
13651365
focusable: function( element ) {
13661366
return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
13671367
}
@@ -1671,7 +1671,7 @@ var scrollParent = $.fn.scrollParent = function( includeHidden ) {
16711671

16721672

16731673

1674-
var tabbable = $.extend( $.expr[ ":" ], {
1674+
var tabbable = $.extend( $.expr.pseudos, {
16751675
tabbable: function( element ) {
16761676
var tabIndex = $.attr( element, "tabindex" ),
16771677
hasTabindex = tabIndex != null;
@@ -8791,7 +8791,7 @@ var widgetsControlgroup = $.widget( "ui.controlgroup", {
87918791
} );
87928792
} );
87938793

8794-
this.childWidgets = $( $.unique( childWidgets ) );
8794+
this.childWidgets = $( $.uniqueSort( childWidgets ) );
87958795
this._addClass( this.childWidgets, "ui-controlgroup-item" );
87968796
},
87978797

@@ -10461,7 +10461,7 @@ $.extend( Datepicker.prototype, {
1046110461
inst = this._getInst( obj ),
1046210462
isRTL = this._get( inst, "isRTL" );
1046310463

10464-
while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden( obj ) ) ) {
10464+
while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) {
1046510465
obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
1046610466
}
1046710467

@@ -17051,12 +17051,12 @@ $.fn.extend( {
1705117051

1705217052
( function() {
1705317053

17054-
if ( $.expr && $.expr.filters && $.expr.filters.animated ) {
17055-
$.expr.filters.animated = ( function( orig ) {
17054+
if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) {
17055+
$.expr.pseudos.animated = ( function( orig ) {
1705617056
return function( elem ) {
1705717057
return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
1705817058
};
17059-
} )( $.expr.filters.animated );
17059+
} )( $.expr.pseudos.animated );
1706017060
}
1706117061

1706217062
if ( $.uiBackCompat !== false ) {

0 commit comments

Comments
 (0)