349.6000061035156
700
1049.5999755859375
1400
const elements = document.querySelectorAll('.slider .slides .slide').length; // кол-во слайдов
const step = 350;
let slides = [];
let slide = 0;
for(let i = 0; i < elements; i++) {
slides[i] = step * i;
}
document.querySelector('.slider .controls .right').onclick = () => {
slide++;
if(slide >= slides.length) slide = 0;
document.querySelector('.slider .slides').scrollLeft = slides[slide];
console.log(slide);
}
document.querySelector('.slider .controls .left').onclick = () => {
slide--;
if(slide < 0) slide = slides.length-1;
document.querySelector('.slider .slides').scrollLeft = slides[slide];
console.log(slide);
}
document.querySelector('.slider .slides').scrollLeft.toFixed(0);
document.querySelector('.slider .slides').scrollLeft = document.querySelector('.slider .slides').scrollLeft.toFixed(0);
document.querySelector('.slider .slides').scrollLeft = Math.floor(document.querySelector('.slider .slides').scrollLeft);
349.6000061035156
698.4000244140625
1048
1397.5999755859375
1746.4000244140625
1749.5999755859375
1749.5999755859375
0
349.6000061035156
349.6000061035156
699.2000122070312
699.2000122070312
1048.800048828125
1048.800048828125
1398.4000244140625
1398.4000244140625
1748
1748
1749.5999755859375
.evaluate().then((data => nightmare.click('')).
.evaluate(() => {
const data = [...document.querySelectorAll('.hot-list-container ul li')];
data.map(el => el.innerHTML).map((el, i) => {
return {
el: el,
status: el.split('').join('').indexOf('DYDX') !== -1 ? 0 : 1,
index: i+1
}
});
document.querySelector(`.hot-list-container ul li:nth-child(1) a`).click();
return data
})