From bace37d72cdbf20af915371142ef6d0072cb009a Mon Sep 17 00:00:00 2001 From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar> Date: Thu, 14 May 2026 22:34:11 -0300 Subject: [PATCH 1/9] agrego estilo --- estilo.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/estilo.css b/estilo.css index fcb26fc..e2df1cb 100644 --- a/estilo.css +++ b/estilo.css @@ -8,6 +8,8 @@ * { box-sizing: border-box; } +.item-lista { + color:red;} body { margin: 0; -- 2.49.1 From ab403921dd2fd345bde75c23bed7d70db9c08d4b Mon Sep 17 00:00:00 2001 From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar> Date: Fri, 15 May 2026 16:46:04 -0300 Subject: [PATCH 2/9] ejercicio 1: cambio de titulo con querySelector --- ejercicios-clase-8.js | 9 +++++++++ index.html | 1 + 2 files changed, 10 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index af39c43..d4e6f4b 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -1 +1,10 @@ // Vincular este archivo al archivo index.html, y resolver aquí los ejercicios. + +console.log("JS conectado"); + +// 1 +function cambiarTitulo() { + const titulo = document.querySelector("h1"); + + titulo.textContent = "Nuevo título desde JavaScript"; +} \ No newline at end of file diff --git a/index.html b/index.html index 0c393ac..64e23af 100644 --- a/index.html +++ b/index.html @@ -31,5 +31,6 @@

¿Y este párrafo? ¿Será importante?

Este es otro párrafo del montón.

+ -- 2.49.1 From 5f776002ccfd695eec4b2231e34caa0270fdefc4 Mon Sep 17 00:00:00 2001 From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar> Date: Sat, 16 May 2026 15:33:38 -0300 Subject: [PATCH 3/9] ejercicio 2: cambiar color de elementos con querySelectorAll --- ejercicios-clase-8.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index d4e6f4b..3234583 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -7,4 +7,13 @@ function cambiarTitulo() { const titulo = document.querySelector("h1"); titulo.textContent = "Nuevo título desde JavaScript"; +} +// 2 + +function destacarComidas() { + const comidas = document.querySelectorAll("li"); + + for (const comida of comidas) { + comida.style.color = "red"; + } } \ No newline at end of file -- 2.49.1 From 130e464ae5693e85c7b2677cda9e72ab48a2f0c5 Mon Sep 17 00:00:00 2001 From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar> Date: Sat, 16 May 2026 15:40:26 -0300 Subject: [PATCH 4/9] ejercicio 3: agregar elementos a una lista con createElement --- ejercicios-clase-8.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 3234583..4c09eef 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -16,4 +16,15 @@ function destacarComidas() { for (const comida of comidas) { comida.style.color = "red"; } +} +// 3 + +function agregarItem(texto) { + const lista = document.querySelector("#lista-inicial"); + + const nuevoItem = document.createElement("li"); + + nuevoItem.textContent = texto; + + lista.appendChild(nuevoItem); } \ No newline at end of file -- 2.49.1 From 0df771ec8e4713af8c96fe95ae3a35a239302639 Mon Sep 17 00:00:00 2001 From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar> Date: Sat, 16 May 2026 16:17:22 -0300 Subject: [PATCH 5/9] ejercicio 4: destacar parrafos importantes con classList --- ejercicios-clase-8.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 4c09eef..0c173e8 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -27,4 +27,15 @@ function agregarItem(texto) { nuevoItem.textContent = texto; lista.appendChild(nuevoItem); +} +// 4 + +function destacarParrafos() { + const parrafos = document.querySelectorAll("#parrafos p"); + + for (const parrafo of parrafos) { + if (parrafo.textContent.includes("importante")) { + parrafo.classList.add("destacado"); + } + } } \ No newline at end of file -- 2.49.1 From 43eafe885a81e91016c6a6ec442f85cdbc807805 Mon Sep 17 00:00:00 2001 From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar> Date: Sat, 16 May 2026 16:21:33 -0300 Subject: [PATCH 6/9] ejercicio 5: crear seccion dinamica del litoral --- ejercicios-clase-8.js | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 0c173e8..f687258 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -38,4 +38,61 @@ function destacarParrafos() { parrafo.classList.add("destacado"); } } +} +// Ejercicio 5 + +function agregarComidasLitoral() { + const div = document.createElement("div"); + + const titulo = document.createElement("h2"); + titulo.textContent = "Comidas típicas del litoral"; + + const parrafo = document.createElement("p"); + parrafo.textContent = "Algunas comidas tradicionales del litoral argentino."; + + const lista = document.createElement("ul"); + + const comidas = ["Chipá", "Surubí", "Pacú"]; + + for (const comida of comidas) { + const item = document.createElement("li"); + + item.textContent = comida; + + lista.appendChild(item); + } + + div.appendChild(titulo); + div.appendChild(parrafo); + div.appendChild(lista); + + document.body.appendChild(div); +}// Ejercicio 5 + +function agregarComidasLitoral() { + const div = document.createElement("div"); + + const titulo = document.createElement("h2"); + titulo.textContent = "Comidas típicas del litoral"; + + const parrafo = document.createElement("p"); + parrafo.textContent = "Algunas comidas tradicionales del litoral argentino."; + + const lista = document.createElement("ul"); + + const comidas = ["Chipá", "Surubí", "Pacú"]; + + for (const comida of comidas) { + const item = document.createElement("li"); + + item.textContent = comida; + + lista.appendChild(item); + } + + div.appendChild(titulo); + div.appendChild(parrafo); + div.appendChild(lista); + + document.body.appendChild(div); } \ No newline at end of file -- 2.49.1 From e9dcded1f691a5d0d1b383c09e43185a60a5b791 Mon Sep 17 00:00:00 2001 From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar> Date: Sat, 16 May 2026 16:24:34 -0300 Subject: [PATCH 7/9] ejercicio 6: eliminar elementos de una lista con remove --- ejercicios-clase-8.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index f687258..cedb6ec 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -39,7 +39,7 @@ function destacarParrafos() { } } } -// Ejercicio 5 +// 5 function agregarComidasLitoral() { const div = document.createElement("div"); @@ -95,4 +95,13 @@ function agregarComidasLitoral() { div.appendChild(lista); document.body.appendChild(div); +} +// 6 + +function limpiarLista(idLista) { + const items = document.querySelectorAll(`#${idLista} li`); + + for (const item of items) { + item.remove(); + } } \ No newline at end of file -- 2.49.1 From fff0ad56c4cfd4cc07f5e5b60ea078200829f92c Mon Sep 17 00:00:00 2001 From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar> Date: Sat, 16 May 2026 16:28:35 -0300 Subject: [PATCH 8/9] ejercicio 7: modificar atributos de imagen con setAttribute --- ejercicios-clase-8.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index cedb6ec..2ce67be 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -104,4 +104,13 @@ function limpiarLista(idLista) { for (const item of items) { item.remove(); } +} +// 7 + +function cambiarImagen() { + const imagen = document.querySelector("#foto"); + + imagen.setAttribute("src", "foto2.jpg"); + + imagen.setAttribute("alt", "Locro"); } \ No newline at end of file -- 2.49.1 From a1945f72531c8ba403163077e8be1561c9672605 Mon Sep 17 00:00:00 2001 From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar> Date: Sat, 16 May 2026 16:31:49 -0300 Subject: [PATCH 9/9] ejercicio 8: construir listas dinamicas con createElement --- ejercicios-clase-8.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 2ce67be..797138a 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -113,4 +113,29 @@ function cambiarImagen() { imagen.setAttribute("src", "foto2.jpg"); imagen.setAttribute("alt", "Locro"); +} +// 8 + +function construirLista(datos) { + const div = document.createElement("div"); + + div.classList.add("grupo-comidas"); + + const titulo = document.createElement("h2"); + titulo.textContent = datos[0]; + + const lista = document.createElement("ul"); + + for (let i = 1; i < datos.length; i++) { + const item = document.createElement("li"); + + item.textContent = datos[i]; + + lista.appendChild(item); + } + + div.appendChild(titulo); + div.appendChild(lista); + + return div; } \ No newline at end of file -- 2.49.1