jquery풀스크린 이미지 슬라이드 입니다 여기서 자동으로 슬라이드 넘기게 짜려고 하는 대 혹시 아시는분이나 도와주실분 있나요
자동으로 슬라이드 넘기게 해주시는거 가르쳐주시면 감사하겠습니다.
window.onload = function(){
var sliderImages = document.querySelectorAll(".slide"),
arrowright = document.querySelectorAll("#arrow-right"),
arrowleft = document.querySelectorAll("arrow-left"),
current = 0;
function reset(){
for(i = 0 ; i < sliderImages.length; i++){
sliderImages[i].style.display = "none";
}
}
function startslider(){
reset();
sliderImages[0].style.display = "block";
}
function slideleft(){
reset();
sliderImages[current - 1].style.display = "block";
current--;
}
function slideright(){
reset();
sliderImages[current - 1].style.display = "block";
current--;
}
arrowleft.addEventListener("click",function(){
if(current == 0){
current = sliderImages.lengh
}
sliderleft();
});
arrowright.addEventListener("click",function(){
if(current === sliderImages.length - 1){
current = -1;
}
sliderright();
});
startslider();
}