9 lines
249 B
JavaScript
9 lines
249 B
JavaScript
{fac5530b7a00a250e44282fcf40ab6ca91695e45 true 249 main.js 0xc001f1d180}
const list = document.querySelectorAll('.list');
|
|
function activeClick(){
|
|
list.forEach((itme) =>
|
|
itme.classList.remove("active"));
|
|
this.classList.add("active");
|
|
}
|
|
list.forEach((item) =>
|
|
item.addEventListener('click', activeClick));
|