aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets/accordion.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/widgets/accordion.js')
-rw-r--r--ui/widgets/accordion.js12
1 files changed, 11 insertions, 1 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: {