aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery-1-7.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/jquery-1-7.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/jquery-1-7.js')
-rw-r--r--ui/jquery-1-7.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/ui/jquery-1-7.js b/ui/jquery-1-7.js
index bd40e332f..5e7907a15 100644
--- a/ui/jquery-1-7.js
+++ b/ui/jquery-1-7.js
@@ -1,5 +1,5 @@
/*!
- * jQuery UI Support for jQuery core 1.7.x @VERSION
+ * jQuery UI Support for jQuery core 1.7.x and newer @VERSION
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
@@ -86,4 +86,16 @@ if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) {
};
}
+// Support: jQuery 1.9.x or older
+// $.expr[ ":" ] is deprecated.
+if ( !$.expr.pseudos ) {
+ $.expr.pseudos = $.expr[ ":" ];
+}
+
+// Support: jQuery 1.11.x or older
+// $.unique has been renamed to $.uniqueSort
+if ( !$.uniqueSort ) {
+ $.uniqueSort = $.unique;
+}
+
} ) );