Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript stop setinterval

let autoScroll = window.setInterval(() => {
  if (window.scrollY >= document.getElementById('second-part').scrollHeight) {

    clearInterval(autoScroll);
  }

  window.scrollBy(0, 10);
}, 25);
 
PREVIOUS NEXT
Tagged: #javascript #stop #setinterval
ADD COMMENT
Topic
Name
7+8 =