aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/accordion/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/accordion/common.js')
-rw-r--r--tests/unit/accordion/common.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/unit/accordion/common.js b/tests/unit/accordion/common.js
index 926d5d9c3..4f1ba7e5d 100644
--- a/tests/unit/accordion/common.js
+++ b/tests/unit/accordion/common.js
@@ -16,7 +16,17 @@ common.testWidget( "accordion", {
disabled: 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: {