Skip to content
Snippets Groups Projects
Commit 3d888165 authored by Ekaterina Kondareva's avatar Ekaterina Kondareva
Browse files

fix jump to accordion item vs regular anchor link

parent aa5580eb
No related branches found
No related tags found
No related merge requests found
......@@ -130,7 +130,7 @@ export class AccordionItem {
if (anchor.length > 0) {
anchor = anchor.substr(1);
let target = document.querySelectorAll(`[id=${anchor}]`)[0];
if (target) {
if (target && target.classList.contains('hy-accordion__button')) {
let targetParent = target.closest('.hy-accordion__item');
let targetContent = targetParent.querySelectorAll('.hy-accordion__content')[0];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment