From b3d7e12d246705394c73acf119609595f38d3b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 18 May 2026 18:13:11 -0300 Subject: [PATCH 1/8] Cree una funcion para el h1 para que cambie su texto a otro. --- ejercicios-clase-8.js | 4 ++++ index.html | 1 + 2 files changed, 5 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index af39c43..11873ab 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -1 +1,5 @@ // Vincular este archivo al archivo index.html, y resolver aquí los ejercicios. +function cambiarTitulo() { + const titulo = document.querySelector("h1"); + titulo.textContent = "Agua"; +} \ No newline at end of file diff --git a/index.html b/index.html index 0c393ac..7eb6259 100644 --- a/index.html +++ b/index.html @@ -30,6 +30,7 @@ comunes.

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

Este es otro párrafo del montón.

+ -- 2.49.1 From 353406174d032aa75952cb14ecac7186b0227074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 18 May 2026 18:34:48 -0300 Subject: [PATCH 2/8] Cree una funcion para que agregue la clase item-lista a los items de la lista --- ejercicios-clase-8.js | 8 ++++++++ estilo.css | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 11873ab..0407aa0 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -2,4 +2,12 @@ function cambiarTitulo() { const titulo = document.querySelector("h1"); titulo.textContent = "Agua"; +} + +function agregarClaseItems() { + const items = document.querySelectorAll("li"); + + for (const item of items) { + item.classList.add("item-lista"); + } } \ No newline at end of file diff --git a/estilo.css b/estilo.css index fcb26fc..35d4dbf 100644 --- a/estilo.css +++ b/estilo.css @@ -101,6 +101,12 @@ h1 { font-weight: bold; } +.item-lista { + color: red; + font-weight: bold; + background-color: yellow; +} + /* ========================= IMAGEN ========================= */ -- 2.49.1 From 391417b4e8265bf5e5277a252dbbff243b741f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 18 May 2026 18:48:34 -0300 Subject: [PATCH 3/8] Cree una funcion llamada agregaritem para que cree un li y lo agregue al final de la lista con un id especifico --- ejercicios-clase-8.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 0407aa0..f653fca 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -10,4 +10,13 @@ function agregarClaseItems() { for (const item of items) { item.classList.add("item-lista"); } +} + +function agregarItem(texto) { + const lista = document.querySelector("#lista-inicial"); + + const nuevaLista = document.createElement("li"); + nuevaLista.textContent = texto; + + lista.appendChild(nuevaLista); } \ No newline at end of file -- 2.49.1 From 1776da59d85f023597718232ea6f8d311a032509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 18 May 2026 19:03:07 -0300 Subject: [PATCH 4/8] Seleccione todos los parrafos dentro del div y si un parrafo tenia la palabra importante le agregue la clase destacado --- ejercicios-clase-8.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index f653fca..9246c69 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -19,4 +19,14 @@ function agregarItem(texto) { nuevaLista.textContent = texto; lista.appendChild(nuevaLista); +} + +const parrafos = document.querySelectorAll("#parrafos p"); + +for (const p of parrafos) { + + if (p.textContent.includes("importante")) { + p.classList.add("destacado"); + } + } \ No newline at end of file -- 2.49.1 From 46d7563665b75c88bb3004137809186e5ded2e94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 18 May 2026 19:27:48 -0300 Subject: [PATCH 5/8] Cree una funcion que agrega un div, un h2, un parrafo introductorio y un ul con comidas del litoral --- ejercicios-clase-8.js | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 9246c69..c153563 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -29,4 +29,35 @@ for (const p of parrafos) { p.classList.add("destacado"); } -} \ No newline at end of file +} + +function agregarDiv() { + const nuevoDiv = document.createElement("div"); + + const nuevoh2 = document.createElement("h2"); + nuevoh2.textContent = "Comidas tipicas de la region del litoral"; + + const pintroductorio = document.createElement("p"); + pintroductorio.textContent = "Estas son algunas comidas tradicionales de la región del litoral argentino."; + + const nuevoul = document.createElement("ul"); + + const comida1 = document.createElement("li"); + comida1.textContent = "Chipa"; + + const comida2 = document.createElement("li"); + comida2.textContent = "Pescado"; + + const comida3 = document.createElement("li"); + comida3.textContent = "Sopa paraguaya"; + + nuevoul.appendChild(comida1); + nuevoul.appendChild(comida2); + nuevoul.appendChild(comida3); + + nuevoDiv.appendChild(nuevoh2); + nuevoDiv.appendChild(pintroductorio); + nuevoDiv.appendChild(nuevoul); + + document.body.appendChild(nuevoDiv); +} -- 2.49.1 From 9b772efe73697ef04f707f916a4a9e9f30e13ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Mon, 18 May 2026 19:57:45 -0300 Subject: [PATCH 6/8] Cree la funcion limpiarLista --- ejercicios-clase-8.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index c153563..8923bcb 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -61,3 +61,12 @@ function agregarDiv() { document.body.appendChild(nuevoDiv); } + +function limpiarLista(idLista) { + const items = document.querySelectorAll(`#${idLista} li`); + + for (const li of items) { + li.remove(); + } + +} -- 2.49.1 From 3f372517b09ba55f912d03c6b3494a1c090247fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Thu, 21 May 2026 18:07:48 -0300 Subject: [PATCH 7/8] Escribi un codigo que hace que cambie de la imagen foto2.jpg y el alt a Locro --- ejercicios-clase-8.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 8923bcb..5cc4920 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -70,3 +70,8 @@ function limpiarLista(idLista) { } } + +const foto = document.querySelector("#foto"); + +foto.src = "foto2.jpg"; +foto.alt = "Locro"; \ No newline at end of file -- 2.49.1 From b0b66c62197f5f8d2a52950f507377381a293ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Blas=20Alarc=C3=B3n?= <47840816@terciariourquiza.edu.ar> Date: Thu, 21 May 2026 18:29:04 -0300 Subject: [PATCH 8/8] Cree la funcion construirLista --- ejercicios-clase-8.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ejercicios-clase-8.js b/ejercicios-clase-8.js index 5cc4920..1c0320f 100644 --- a/ejercicios-clase-8.js +++ b/ejercicios-clase-8.js @@ -74,4 +74,26 @@ function limpiarLista(idLista) { const foto = document.querySelector("#foto"); foto.src = "foto2.jpg"; -foto.alt = "Locro"; \ No newline at end of file +foto.alt = "Locro"; + +function construirLista(array) { + + const nuevoDiv2 = document.createElement("div") + nuevoDiv2.classList.add("grupo-comidas"); + + const titulo2 = document.createElement("h2"); + titulo2.textContent = array[0]; + + const ul2 = document.createElement("ul") + + for (let i = 1; i < array.length; i++) { + const li = document.createElement("li"); + li.textContent = array[i]; + ul2.appendChild(li); + } + + nuevoDiv2.appendChild(titulo2); + nuevoDiv2.appendChild(ul2); + + return nuevoDiv2; +} \ No newline at end of file -- 2.49.1