Skip to content

Instantly share code, notes, and snippets.

@itseduvieira
Created September 14, 2025 18:15
Show Gist options
  • Select an option

  • Save itseduvieira/7bdc710bedc40fd0dc37dccad3fe6202 to your computer and use it in GitHub Desktop.

Select an option

Save itseduvieira/7bdc710bedc40fd0dc37dccad3fe6202 to your computer and use it in GitHub Desktop.
Autoscroll website script
setTimeout(() => {
(function () {
var jq = document.createElement('script');
jq.src = 'https://code.jquery.com/jquery-3.6.0.min.js';
jq.onload = function () {
var easing = document.createElement('script');
easing.src = 'https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js';
easing.onload = function () {
$(function () {
$('html, body').animate({
scrollTop: $(document).height() - $(window).height()
}, 20000, "linear"); // "linear or swing"
});
};
document.head.appendChild(easing);
};
document.head.appendChild(jq);
})();
}, 10000); // delay time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment