SHARE
TWEET

Untitled

a guest Jul 23rd, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var executedOnScroll = $("#estadisticas").offset().top; // jQuery
  2. var executedOnScroll = document.getElementById("estadisticas").offsetTop; // JS
  3.      
  4. $(document).scroll(function(){...}); // jQuery
  5. document.addEventListener("scroll", function(){...}); // JS
  6.      
  7. // jQuery
  8. var actualScrollTop = $(window).scrollTop();
  9. if(actualScrollTop >= elementoScrollTop){
  10.     tuFuncion()
  11. }
  12. // JS
  13. var actualScrollTop = window.scrollY;
  14. if(actualScrollTop >= elementoScrollTop){
  15.     tuFuncion()
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top