Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WebHarvy Zillow Scrolling JS code
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function scrollList() {
list = document.getElementsByClassName('photo-cards')[0];
for (var i = 0; i < list.childElementCount; i++) {
list.children[i].scrollIntoView();
await sleep(100);
}
}
scrollList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment