diff --git a/index.js b/index.js index 7bcdb98..d8b5cb5 100644 --- a/index.js +++ b/index.js @@ -127,7 +127,9 @@ const renderPerguntas = async ({ const faqContainer = document.querySelectorAll('.faq-container'); faqContainer.forEach((container) => { - container.addEventListener('click', function () { + const question = container.querySelector('.question'); + + question.addEventListener('click', function () { const dropIcon = container.querySelector('.drop'); const content = container.querySelector('.content'); diff --git a/mais-buscados/script.js b/mais-buscados/script.js index 2ee9566..b6e088e 100644 --- a/mais-buscados/script.js +++ b/mais-buscados/script.js @@ -81,7 +81,9 @@ const renderMaisBuscadas = async ({ pagina = 1, qtdPorPg = 20, order = 'desc' } const faqContainer = document.querySelectorAll('.faq-container'); faqContainer.forEach((container) => { - container.addEventListener('click', function () { + const question = container.querySelector('.question'); + + question.addEventListener('click', function () { const dropIcon = container.querySelector('.drop'); const content = container.querySelector('.content'); diff --git a/mais-buscados/style.css b/mais-buscados/style.css index f7b676e..535cefc 100644 --- a/mais-buscados/style.css +++ b/mais-buscados/style.css @@ -56,7 +56,6 @@ main { } .faq-container { - cursor: pointer; font-size: 2rem; border-radius: 20px; padding: 1rem 0; @@ -70,6 +69,7 @@ main { color: var(--titulos); font-size: 3.2rem; font-weight: 300; + cursor: pointer; } .spinnerContainer {