Skip to content

Commit

Permalink
Update count.js
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirSaenko committed Feb 20, 2022
1 parent 6765fa7 commit 5fa7980
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions scripts/count.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

"use strict";

let countTittle = document.getElementById("count");
let countTitle = document.getElementById("count");
let allImages = document.getElementById("all-images");
let camera = document.getElementById("camera");
let headphone = document.getElementById("headphone");
Expand All @@ -10,46 +10,46 @@ let sho = document.getElementById("shoe");
let watch = document.getElementById("watch");
let computer = document.getElementById("computer");

countTittle.textContent = "";
countTitle.textContent = "";

allImages.addEventListener('click', function() {
countTittle.textContent = "";
countTittle.style.display = "none";
countTittle.style.visibility = "hidden";
countTitle.textContent = "";
countTitle.style.display = "none";
countTitle.style.visibility = "hidden";
})

camera.addEventListener('click', function() {
countTittle.style.display = "flex";
countTittle.style.visibility = "visible";
countTittle.textContent = "Найдено 3 совпадений";
countTitle.style.display = "flex";
countTitle.style.visibility = "visible";
countTitle.textContent = "Найдено 3 совпадений";
})

headphone.addEventListener('click', function() {
countTittle.style.display = "flex";
countTittle.style.visibility = "visible";
countTittle.textContent = "Найдено 4 совпадений";
countTitle.style.display = "flex";
countTitle.style.visibility = "visible";
countTitle.textContent = "Найдено 4 совпадений";
})

mobile.addEventListener('click', function() {
countTittle.style.display = "flex";
countTittle.style.visibility = "visible";
countTittle.textContent = "Найдено 5 совпадений";
countTitle.style.display = "flex";
countTitle.style.visibility = "visible";
countTitle.textContent = "Найдено 5 совпадений";
})

sho.addEventListener('click', function() {
countTittle.style.display = "flex";
countTittle.style.visibility = "visible";
countTittle.textContent = "Найдено 4 совпадения";
countTitle.style.display = "flex";
countTitle.style.visibility = "visible";
countTitle.textContent = "Найдено 4 совпадения";
})

watch.addEventListener('click', function() {
countTittle.style.display = "flex";
countTittle.style.visibility = "visible";
countTittle.textContent = "Найдено 4 совпадения";
countTitle.style.display = "flex";
countTitle.style.visibility = "visible";
countTitle.textContent = "Найдено 4 совпадения";
})

computer.addEventListener('click', function() {
countTittle.style.display = "flex";
countTittle.style.visibility = "visible";
countTittle.textContent = "Найдено 4 совпадения";
countTitle.style.display = "flex";
countTitle.style.visibility = "visible";
countTitle.textContent = "Найдено 4 совпадения";
})

0 comments on commit 5fa7980

Please sign in to comment.