Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

window.scrollto(0 0) not working

const scrollToTop = () => {
  document.getElementById("scroller").scroll(0,0)
}

<button onClick={scrollToTop}>Scroll to Top</button>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #working
ADD COMMENT
Topic
Name
2+8 =