JS przewiń do dołu
window.scrollTo(0,document.body.scrollHeight);
Shy Skunk
window.scrollTo(0,document.body.scrollHeight);
window.onscroll = function() {
let d = document.documentElement;
let offset = d.scrollTop + window.innerHeight;
let height = d.offsetHeight;
console.log('offset = ' + offset);
console.log('height = ' + height);
if (offset >= height) {
console.log('At the bottom');
}
};