Adicionar classe quando elemento no viewport baunilla javascript
window.addEventListener('scroll', function (event) {
if (isInViewport(theElementToWatch)) {
// update the element display
}
}, false);
code fighter