Once I hit a button, I wanted the page to get to its lowest point and then back up. I think some sort of callback would be needed, but I can't define it. I report below the portion of the code concerned.
$(document).ready(function() {
$(".home-button").on('click', function() {
$('html, body').animate({
'scrollTop': $('footer').offset().top
}, 1500);
//then come back
});
});
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
<a class="home-button">Start</a>
<!-- ... -->
<footer><p>Stop and go back</p></footer>
</body>
<html>