upload javascript for week 07

main
ohjian 2 years ago
parent 545f3d0340
commit d7b05d5bdf

@ -0,0 +1,9 @@
var toggler = document.getElementsByClassName("caret");
var i;
for (i = 0; i < toggler.length; i++) {
toggler[i].addEventListener("click", function() {
this.parentElement.querySelector(".nested").classList.toggle("active");
this.classList.toggle("caret-down");
});
}
Loading…
Cancel
Save