My html contains node with classname 'custom-collection-pagination-list'.
And function asynchronously add li tags inside id with classname "custom-collection-pagination__item".
How to find and remove active class on another li before I add it to target li?
$(".custom-collection-pagination-list").on('click', '.custom-collection-pagination__item', function(e) {
//find and delete here
e.target.classList.add('paginate-active');
})