const list = document.querySelectorAll('.list .test')
window.addEventListener('click', (e)=> {
const target = e.target;
if(target.classList.contains('test')){
resetActiveItem()
target.classList.add('active')
}
if(target.classList.contains('reset')) {
resetActiveItem()
}
})
function resetActiveItem() {
list.forEach(item=>item.classList.remove('active'));
}
$(document).ready(function() {
$('#fullpage').fullpage({
scrollBar:true,
afterSlideLoad: function(anchorLink, index, slideAnchor, slideIndex){
if ( slideIndex != 0 ) {
wow = new WOW(
{
animateClass: 'animated',
live: true
}
);
wow.init();
}
},
onSlideLeave: function(anchorLink, index, slideIndex, direction){
$('.slide').not('.slide-' + slideIndex).find('.wow').css('visibility', 'hidden');
},
});
});