diff --git a/BC-Layout.html b/BC-Layout.html index 2ac11ab..f773c61 100644 --- a/BC-Layout.html +++ b/BC-Layout.html @@ -248,6 +248,7 @@

{{ page.name }}

+ diff --git a/BC-Product.html b/BC-Product.html index 70dba88..79106ae 100644 --- a/BC-Product.html +++ b/BC-Product.html @@ -21,7 +21,7 @@ - + Image of {{ product.name | escape }} diff --git a/assets/scripts/product-slideshow.js b/assets/scripts/product-slideshow.js index ab04712..5b9b983 100644 --- a/assets/scripts/product-slideshow.js +++ b/assets/scripts/product-slideshow.js @@ -1,8 +1,15 @@ window.onload = function () { + // Auto increment main images var list = document.getElementsByClassName("product__slide"); for (var i = 0; i < list.length; i++) { list[i].setAttribute("data-slide", "image" + i); } + // + // Auto increment thumbnails + var thumbnailList = document.getElementsByClassName("product__thumbnail--link"); + for (var j = 0; j < thumbnailList.length; j++) { + list[j].setAttribute("onclick", "show" + j); + } }; function show(nr) {