Skip to content
Snippets Groups Projects
Commit fff0984d authored by Stephen Mustgrave's avatar Stephen Mustgrave
Browse files

Issue #3491463 by irsar: Accordions are not working

parent caf35adc
No related branches found
No related tags found
No related merge requests found
Pipeline #358388 passed
......@@ -21,7 +21,7 @@
$('main .text-formatted .usa-accordion').each(function () {
let $itemCounter = 0;
$('.usa-accordion__button', this).each(function () {
if (!$(this).hasAttribute('aria-controls')) {
if (!$(this).attr('aria-controls')) {
$(this).attr('aria-controls', `${$containerCounter}-${$itemCounter}`);
$itemCounter++;
}
......@@ -29,7 +29,7 @@
$itemCounter = 0;
$('.usa-accordion__content', this).each(function () {
if (!$(this).hasAttribute('id')) {
if (!$(this).attr('id')) {
$(this).attr('id', `${$containerCounter}-${$itemCounter}`);
$itemCounter++;
}
......
......@@ -17,9 +17,8 @@ uswds_accordion.frontend:
js:
js/aftermarket/uswds_accordion.js: { preprocess: false, minified: true }
dependencies:
- core/drupal
- core/jquery
- core/once
- core/drupal
dialog:
css:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment