Skip to content

Commit ceff22a

Browse files
troquei o getelementById por querySelector na Main.js
1 parent ed23517 commit ceff22a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ document.addEventListener("DOMContentLoaded", () => {
6464
const statsContainer2 = document.getElementById("custoParaIniciar");
6565

6666
const selCategoria = document.querySelector('[name="filtroCategoria"]');
67-
const selOrdem = document.getElementById("ordenacao");
67+
const selOrdem = document.querySelector("#ordenacao");
6868

6969
selCategoria.addEventListener('change', (event) => {
7070
const mostrarCategoria = event.target.value;
@@ -101,10 +101,10 @@ document.addEventListener("DOMContentLoaded", () => {
101101

102102

103103
const mostrarTodos = document.querySelector('[data-testid="button-clear"]');
104-
const statsContainer = document.getElementById('calcularNivelMedioDeDificuldade');
105-
const statsContainer2 = document.getElementById('custoParaIniciar');
106-
const selOrdem = document.getElementById('ordenacao');
107-
const selCategoria = document.getElementById('filtro');
104+
const statsContainer = document.querySelector('#calcularNivelMedioDeDificuldade');
105+
const statsContainer2 = document.querySelector('#custoParaIniciar');
106+
const selOrdem = document.querySelector('#ordenacao');
107+
const selCategoria = document.querySelector('#filtro');
108108

109109
mostrarTodos.addEventListener("click", () => {
110110
// zera a lista de cards

0 commit comments

Comments
 (0)