Created
December 22, 2017 10:42
-
-
Save esr360/c4ca85b3010dc322def28907b7c7a3f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MODULE = 'accordion'; | |
document.querySelectorAll(`.${MODULE}`).forEach(accordion => { | |
const panels = accordion.querySelectorAll(`.${MODULE}__panel`); | |
panels.forEach(panel => { | |
const TITLE = panel.querySelector(`.${MODULE}__title`); | |
const CONTENT = panel.querySelector(`.${MODULE}__content`); | |
... | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment