aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'ui/widgets')
-rw-r--r--ui/widgets/accordion.js12
-rw-r--r--ui/widgets/checkboxradio.js2
-rw-r--r--ui/widgets/selectmenu.js2
-rw-r--r--ui/widgets/tabs.js2
4 files changed, 14 insertions, 4 deletions
diff --git a/ui/widgets/accordion.js b/ui/widgets/accordion.js
index b6a7a7eee..ff6e4631d 100644
--- a/ui/widgets/accordion.js
+++ b/ui/widgets/accordion.js
@@ -52,7 +52,17 @@ return $.widget( "ui.accordion", {
collapsible: false,
event: "click",
header: function( elem ) {
- return elem.find( "> li > :first-child" ).add( elem.find( "> :not(li)" ).even() );
+ return elem
+ .find( "> li > :first-child" )
+ .add(
+ elem.find( "> :not(li)" )
+
+ // Support: jQuery <3.5 only
+ // We could use `.even()` but that's unavailable in older jQuery.
+ .filter( function( i ) {
+ return i % 2 === 0;
+ } )
+ );
},
heightStyle: "auto",
icons: {
diff --git a/ui/widgets/checkboxradio.js b/ui/widgets/checkboxradio.js
index fc812116e..379252758 100644
--- a/ui/widgets/checkboxradio.js
+++ b/ui/widgets/checkboxradio.js
@@ -156,7 +156,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
_getRadioGroup: function() {
var group;
var name = this.element[ 0 ].name;
- var nameSelector = "input[name='" + $.escapeSelector( name ) + "']";
+ var nameSelector = "input[name='" + CSS.escape( name ) + "']";
if ( !name ) {
return $( [] );
diff --git a/ui/widgets/selectmenu.js b/ui/widgets/selectmenu.js
index eecd368f5..f1b48fa60 100644
--- a/ui/widgets/selectmenu.js
+++ b/ui/widgets/selectmenu.js
@@ -415,7 +415,7 @@ return $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
}
if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
- $.escapeSelector( this.ids.button ) ).length ) {
+ CSS.escape( this.ids.button ) ).length ) {
this.close( event );
}
}
diff --git a/ui/widgets/tabs.js b/ui/widgets/tabs.js
index e191dfbb4..72b868e4f 100644
--- a/ui/widgets/tabs.js
+++ b/ui/widgets/tabs.js
@@ -722,7 +722,7 @@ $.widget( "ui.tabs", {
// meta-function to give users option to provide a href string instead of a numerical index.
if ( typeof index === "string" ) {
index = this.anchors.index( this.anchors.filter( "[href$='" +
- $.escapeSelector( index ) + "']" ) );
+ CSS.escape( index ) + "']" ) );
}
return index;