-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGloves.js
28 lines (23 loc) · 924 Bytes
/
Gloves.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
const sliderMainImage = document.getElementById("product-main-image"); //product container image
const sliderImageList = document.getElementsByClassName("image-list"); // image thumblian group selection
console.log(sliderImageList);
sliderImageList[0].onclick = function(){
sliderMainImage.src = sliderImageList[0].src;
console.log(sliderMainImage.src);
};
sliderImageList[1].onclick = function(){
sliderMainImage.src = sliderImageList[1].src;
console.log(sliderMainImage.src);
};
sliderImageList[2].onclick = function(){
sliderMainImage.src = sliderImageList[2].src;
console.log(sliderMainImage.src);
};
sliderImageList[3].onclick = function(){
sliderMainImage.src = sliderImageList[3].src;
console.log(sliderMainImage.src);
};
sliderImageList[4].onclick = function(){
sliderMainImage.src = sliderImageList[4].src;
console.log(sliderMainImage.src);
};