Skip to content
Snippets Groups Projects
Commit c44f7793 authored by Anwoon's avatar Anwoon
Browse files

Isssue #3430431 - Fix eslint

parent 3484405d
No related branches found
No related tags found
1 merge request!2Issue #3430431 - Added ci and compatibility to drupal 11
......@@ -11,7 +11,6 @@
(function ($, Drupal) {
Drupal.behaviors.collapsible = {
attach(context) {
// Use the jQuery once plugin to execute code once.
once('collapsible', 'body').forEach(function () {
const $body = $('body');
......@@ -39,8 +38,7 @@
// Custom event.
$parent.trigger('collapsible-open');
}
else {
} else {
$cta.attr('aria-expanded', 'false');
$parent.removeClass('is-expanded');
......@@ -59,20 +57,20 @@
$('.js-collapsible.is-expanded')
.not($parent)
.each(function () {
const $collapsible = $(this);
const $collapsible = $(this);
// Only if their data-collapsible-close==true.
if ($collapsible.attr('data-collapsible-close') === 'true') {
const $cta = $collapsible.find('.js-collapsible-cta');
// Only if their data-collapsible-close==true.
if ($collapsible.attr('data-collapsible-close') === 'true') {
const $cta = $collapsible.find('.js-collapsible-cta');
// Close them.
$cta.attr('aria-expanded', 'false');
$collapsible.removeClass('is-expanded');
// Close them.
$cta.attr('aria-expanded', 'false');
$collapsible.removeClass('is-expanded');
// Custom event.
$collapsible.trigger('collapsible-close');
}
});
// Custom event.
$collapsible.trigger('collapsible-close');
}
});
});
});
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment