(dotElems, slidesElem, index, length)
| 156 | } |
| 157 | |
| 158 | const setSlide = function(dotElems, slidesElem, index, length) { |
| 159 | |
| 160 | slidesElem.style.transform = `translateX(-${ (100 / length) * index }%)` |
| 161 | |
| 162 | dotElems.forEach((dotElem) => dotElem.classList.remove('active')) |
| 163 | dotElems[index].classList.add('active') |
| 164 | |
| 165 | } |
| 166 | |
| 167 | const init = function(elem, slides, instance, opts) { |
| 168 |