aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widget.js
diff options
context:
space:
mode:
authorEirik Sletteberg <eiriksletteberg@gmail.com>2016-12-02 14:41:30 +0100
committerScott González <scott.gonzalez@gmail.com>2017-05-02 15:28:51 -0400
commit0b7246b6eeadfa9e2696e22f3230f6452f8129dc (patch)
tree02cd4f06e3944fc1417d4687cb3d14a12f3e8683 /ui/widget.js
parent50efd6e1b063822c4a0ecb38f324ed3354f387c4 (diff)
downloadjquery-ui-0b7246b6eeadfa9e2696e22f3230f6452f8129dc.tar.gz
jquery-ui-0b7246b6eeadfa9e2696e22f3230f6452f8129dc.zip
Core: Fix JQMIGRATE warning about `jQuery.expr[":"]`
This commit polyfills `jQuery.expr.pseudos` for old versions of jQuery. Fixes #15185 Closes gh-1773
Diffstat (limited to 'ui/widget.js')
-rw-r--r--ui/widget.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/widget.js b/ui/widget.js
index 011396811..c101e59d4 100644
--- a/ui/widget.js
+++ b/ui/widget.js
@@ -65,7 +65,7 @@ $.widget = function( name, base, prototype ) {
}
// Create selector for plugin
- $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
+ $.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) {
return !!$.data( elem, fullName );
};
@@ -517,7 +517,7 @@ $.Widget.prototype = {
current = that.classesElementLookup[ classes[ i ] ] || $();
if ( options.add ) {
bindRemoveEvent();
- current = $( $.unique( current.get().concat( options.element.get() ) ) );
+ current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );
} else {
current = $( current.not( options.element ).get() );
}