Widget: Compass: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Eschmidt (talk | contribs)
No edit summary
Eschmidt (talk | contribs)
No edit summary
Line 692: Line 692:
                 event.target.closest('.subtheme').querySelectorAll('.question').forEach(el => el.classList.toggle('opened'));
                 event.target.closest('.subtheme').querySelectorAll('.question').forEach(el => el.classList.toggle('opened'));
             }
             }
             if (event.target.classList.contains('question')) {
             if (event.target.tagName === 'H4') {
                 event.target.querySelector('.answer')?.classList.toggle('opened');
                event.target.classList.toggle('opened');
                 event.target.closest('.question').querySelector('.answer').classList.toggle('opened');
             }
             }
            // if (event.target.classList.contains('question')) {
            //    event.target.querySelector('.answer')?.classList.toggle('opened');
            // }
         });
         });



Revision as of 10:09, 7 December 2022

Development version of the Compass.
Not ready for production!