// Set interval for scrolling posts setInterval(function () { // Scroll down window.scrollBy(0, 500); // Scroll up after 5 seconds setTimeout(function () { window.scrollBy(0, -500); }, 5000); }, 10000); // Open post after 30 seconds setTimeout(function () { // Assuming the post link is stored in the variable postLink window.location.href = postLink; }, 30000); // Open another post after 30 more seconds setTimeout(function () { // Assuming the link to the second post is stored in the variable secondPostLink window.location.href = secondPostLink; }, 60000); Blog - InsuranceSoCheap