'Javascript Pagination, Skip 5 each

There is a pagination behavior error on the current page. I hope that the movement goes well. I want skip 5 each pagination

current move error. I want help.

/* Pagination Button Event */
let curpager;
Array.prototype.forEach.call(pagepagers, function (pager) {
  pager.addEventListener('click', function (e) {
    e.preventDefault();
    curpager = document.querySelector('.pagerActive');
    curpager.classList.remove('pagerActive');
    
    curpager = this;
    this.classList.add('pagerActive');

    curSlide.classList.remove('slideActive');
    curIndex = Number(this.getAttribute('data-index'));
    curSlide = slideContents[curIndex];
    curSlide.classList.add('slideActive');
    slideList.style.transition = slideSpeed + "ms";
    slideList.style.transform = "translate3d(-" + (slideWidth * (curIndex +4)) + "px, 0px, 0px)";
  });
});         

Can you tell me solution?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source