$('.list').on('click', 'li', function(){
$('.list li').removeClass('active');
$(this).addClass('active');
});
const lists = document.querySelectorAll('.list li');
lists.forEach(list => {
list.addEventListener('click', () => {
lists.forEach(list => list.classList.remove('active'));
list.classList.add('active');
});
});