Scroll to 1000 px from top
$(document).ready(function () {
$('html, body').animate({
scrollTop: $("body").offset().top + 1000
}, 2000);
});
Working Example
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
<script>
$(document).ready(function () {
$('html, body').animate({
scrollTop: $("body").offset().top + 1000
}, 2000);
});
</script>
</head>
<body>
<div id="div1" style="height: 5000px; width 100px">
Test
</div>
</body>
</html>
Most Helpful This Week
How to change text color on click using JavaScript?
Example to take user input and display on screen using JavaScript
How to join string with number in JavaScript?
Image Rollover Using onMouseOver and onMouseOut
How to current URL, HOST and URL attributes using JavaScript or jQuery?
jQuery show input text inside div after on click event