I'm currently attempting to implement the Bootstrap method .collapse('show')
on a node list of elements, but I've run into an issue in the console.log that reads: (Uncaught TypeError: findEl[i].collapse is not a function).
Because I am working with a node list, I have tried using a loop to iterate over them, however, it doesn't seem to be the correct approach.
let findEl = document.querySelectorAll('.someClass');
let i;
for (i = 0; i < findEl.length; i++) {
findEl[i].collapse('show');
}
What would be the most effective way to correctly apply the bootstrap method?