Skip to content

Commit

Permalink
fix: curtir fechando container
Browse files Browse the repository at this point in the history
  • Loading branch information
rrafaelc committed Nov 27, 2023
1 parent 83ab60f commit ac03c9d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
4 changes: 3 additions & 1 deletion mais-buscados/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
2 changes: 1 addition & 1 deletion mais-buscados/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ main {
}

.faq-container {
cursor: pointer;
font-size: 2rem;
border-radius: 20px;
padding: 1rem 0;
Expand All @@ -70,6 +69,7 @@ main {
color: var(--titulos);
font-size: 3.2rem;
font-weight: 300;
cursor: pointer;
}

.spinnerContainer {
Expand Down

0 comments on commit ac03c9d

Please sign in to comment.