I have two collapsible component inside this page.
Why is the second one not working??
I have two collapsible component inside this page.
Why is the second one not working??
Hello,
It’s because you initialized only the first collapsible
, not all:
// This selects the first element with the specified class
document.querySelector('.collapsible.expandable')
// This selects all elements that match:
document.querySelectorAll('.collapsible.expandable');
oh wow. Thank you!
I assume in my app.js file I should check all the methods then!