Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript go to top of page

window.scroll({top: 0, left: 0});
//Or with jQuery
$('html,body').scrollTop(0);
//with animation
$('html, body').animate({ scrollTop: 0 }, 'fast');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #top #page
ADD COMMENT
Topic
Name
9+7 =