Skip to content

Commit

Permalink
add js interactivity
Browse files Browse the repository at this point in the history
  • Loading branch information
TuaneLeao committed Nov 15, 2023
1 parent 2954fef commit e2c72c2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
11 changes: 11 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ h2 {
border-bottom: 1px solid #ff725e;
border-left: 1px solid #ff725e;
margin-top: -8px;
padding: 0px 24px;
height: 0;
overflow: hidden;
opacity: 0;
transition: 0.15s;
}

.duvida.ativa .paragrafo{
opacity: 1;
height: fit-content;
padding: 24px;
}

Expand All @@ -132,6 +142,7 @@ footer{
gap: 80px;
padding: 64px 80px;
justify-content: space-between;
width: auto;
}

footer img,
Expand Down
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
var elementos = document.querySelectorAll('.duvida');
var elementosDuvida = document.querySelectorAll('.duvida')

elementosDuvida.forEach(function (duvida) {
duvida.addEventListener('click', function() {
duvida.classList.toggle ('ativa')
})
})

0 comments on commit e2c72c2

Please sign in to comment.