Home Products Ingredients Routine Data Types Utterances

Skincare Products

Here are popular Korean skincare products! Navigate to the ingredients page to see their ingredient list.

Hover on the right or left side of an image to check out the next product!

1 / 3
Snail Mucin Toner
2 / 3
Anua Heartleaf Toner
3 / 3
Beauty of Joseon Glow Serum
// variable slideIndex that sets parameter of showSlides(n) to 1
let slideIndex = 1;
showSlides(slideIndex);

// when user clicks on the left or right arrow, adds or subtracts 1 to the value of the slideIndex
// and sets this value as the argument for the n parameter in the function showSlides
function plusSlides(n) {
    showSlides(slideIndex += n);
}

// function to show the current slide that takes n as a parameter
function showSlides(n) {
    // variable i with no value
    let i;
    // creates variable, slides, that gets all classes in html document with mySlides
    let slides = document.getElementsByClassName("mySlides");

    // if parameter n is greater than the length of slides, set it equal to 1
    if (n > slides.length) {
        slideIndex = 1
    }
    // if n is less than 1, set slide index equal to slides length(3)
    if (n < 1) {
        slideIndex = slides.length
    }
    // for loop will hide ALL slides
    for (i = 0; i < slides.length; i++) {
        slides[i].style.display = "none";
    }

    // will show the slide that you want 
    slides[slideIndex - 1].style.display = "block";
    // console.log(n, slideIndex - 1);
}