Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var executedOnScroll = $("#estadisticas").offset().top; // jQuery
- var executedOnScroll = document.getElementById("estadisticas").offsetTop; // JS
- $(document).scroll(function(){...}); // jQuery
- document.addEventListener("scroll", function(){...}); // JS
- // jQuery
- var actualScrollTop = $(window).scrollTop();
- if(actualScrollTop >= elementoScrollTop){
- tuFuncion()
- }
- // JS
- var actualScrollTop = window.scrollY;
- if(actualScrollTop >= elementoScrollTop){
- tuFuncion()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement