From 3d45a36f4d1fdbf1a8f1451fd142debcea96a409 Mon Sep 17 00:00:00 2001 From: Sergey Yarkov Date: Sun, 1 Sep 2019 02:19:56 +0300 Subject: [PATCH] Tooltips fixed --- src/js/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/index.js b/src/js/index.js index 4931313..9057d49 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -28,6 +28,9 @@ $('.owl-carousel').owlCarousel({ const links = document.querySelectorAll('.wrap-questions__item a'); links.forEach((link) => { link.addEventListener('click', () => { + document.querySelectorAll('.question-content').forEach((link) => { + link.style.display = 'none'; + }); const contentTollTip = link.parentNode.parentNode.querySelector('.question-content'); const contentTollTipClose = link.parentNode.parentNode.querySelector('.tooltip-close'); contentTollTipClose.addEventListener('click', () => { @@ -36,5 +39,5 @@ links.forEach((link) => { }); contentTollTip.classList.add('fade'); contentTollTip.style.display = 'block'; - }); + }); }); \ No newline at end of file