Is there a way to make this function target all elements with the class ".stop" and stop the video when any of these elements are clicked?
window.addEventListener("load", function(event) {
window.addEventListener('scroll', checkScroll, false);
window.addEventListener('resize', checkScroll, false);
let playvideo = document.querySelector('video');
let close = document.querySelector('.stop');
close.onclick = () => {
playvideo.pause();
}
});