kolobku_xxx,
function slider() {
var blocks = document.querySelectorAll(".slide"),
len = blocks.length,
i = 0;
function hello() {
blocks[i].classList.toggle("active");
i++;
i %= len;
blocks[i].classList.toggle("active");
setTimeout(hello, 5E3)
}
setTimeout(hello, 5E3)
}
window.addEventListener("load", slider);