-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
40 lines (32 loc) · 1.01 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
var slider = document.querySelectorAll('.slider-box img')
function next(){
for (var i = 0; i < slider.length; i++) {
if (slider[i].classList.contains('visible')) {
slider[i].classList.remove('visible')
slider[i].classList.add('invisible')
slider[i + 1].classList.add('visible')
slider[i + 1].classList.remove('invisible')
}
else {
slider[i].classList.remove('invisible')
slider[i].classList.add('visible')
slider[i + 1].classList.remove('visble')
slider[i + 1].classList.add('invisble')
}break
}
}
// function prev(){
// for (var i = 0; i < slider.length; i++) {
// console.log(slider[i])
// }
// }
// slideImages()
// function slideImages() {
// var i;
// var slides = document.getElementById('image');
// for(i = 0; 1 <slides.length; 1++) {
// slides[i].style.display = "none";
// }
// slideIndex++;
// }
// setTimeout(showSlides, 2000);