1 function surprise(event) {2 var scroll = document.getElementById('scroll');3 console.log('scroll '+scroll.scrollTop);4 console.log(event);5 }6 7 window.addEventListener('load', function(event) {8 var scroll = document.getElementById('scroll');9 scroll.addEventListener('scroll', surprise, true);10 }, true);
Enlace
El enlace para compartir es: