document.addEventListener('DOMContentLoaded', function() {
var Left = document.getElementById('arrowLeft'),
Right = document.getElementById('arrowRight'),
sliderLine = document.getElementById('sliderLine'),
sliderItem = document.getElementsByClassName('sliderItem')[0],
left = 0;
function arrowLeft(){
console.log(sliderItem);
widthSliderItem = sliderItem.offsetWidth;
left = left - widthSliderItem;
if(left >= -2*widthSliderItem){
sliderLine.style.left = left + 'px';
}else{
sliderLine.style.left = 0 + 'px';
left = 0;
}
}
function arrowRight(){
left = left + 950;
if(left <= 0){
sliderLine.style.left = left + 'px';
}else{
left = 0;
}
}
});