From 6339ee8a4bdce34147aa35f197d5813f2a5c0192 Mon Sep 17 00:00:00 2001 From: Franccesco Petta Date: Wed, 18 Jun 2025 11:42:41 -0400 Subject: [PATCH 01/16] Divide and Conquer --- script.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script.js b/script.js index 5762129..823dd22 100644 --- a/script.js +++ b/script.js @@ -5,10 +5,12 @@ console.log("Hello! If you see this, the script is working."); - [ ] Select the section with an id of container using querySelector. - [ ] Select all of the list items with a class of "second". - [ ] Select a list item with a class of third, but only the list item inside of the ol tag. + - [ ] Give the section with an id of container the text "Hello!". - [ ] Add the class main to the div with a class of footer. - [ ] Remove the class main on the div with a class of footer. - [ ] Create a new li element. + - [ ] Give the li the text "four". - [ ] Append the li to the ul element. - [ ] Loop over all of the lis inside the ol tag and give them a background color of "green". From 7bb6d5a9f5161d33fa18d540a37f457c19f0e931 Mon Sep 17 00:00:00 2001 From: Franccesco Petta Date: Wed, 18 Jun 2025 12:00:54 -0400 Subject: [PATCH 02/16] Divide and Conquer --- script.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 823dd22..2ab0ff6 100644 --- a/script.js +++ b/script.js @@ -1,16 +1,19 @@ console.log("Hello! If you see this, the script is working."); /* +Michaelangelo - [ ] Select the section with an id of container without using querySelector. - [ ] Select the section with an id of container using querySelector. - [ ] Select all of the list items with a class of "second". - [ ] Select a list item with a class of third, but only the list item inside of the ol tag. - + +Frank - [ ] Give the section with an id of container the text "Hello!". - [ ] Add the class main to the div with a class of footer. - [ ] Remove the class main on the div with a class of footer. - [ ] Create a new li element. +Ramses - [ ] Give the li the text "four". - [ ] Append the li to the ul element. - [ ] Loop over all of the lis inside the ol tag and give them a background color of "green". From 1a518910ec4615e347cdf26c8029bac5a7e76eca Mon Sep 17 00:00:00 2001 From: RamsesCode Date: Wed, 18 Jun 2025 12:02:01 -0400 Subject: [PATCH 03/16] test --- script.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script.js b/script.js index 823dd22..1978c33 100644 --- a/script.js +++ b/script.js @@ -20,3 +20,5 @@ console.log("Hello! If you see this, the script is working."); // Try rewriting this without using querySelector const header = document.querySelector("#container"); console.log("header", header); + +//test From 47da39e807c92295200761fab2fa6eafbc03cd24 Mon Sep 17 00:00:00 2001 From: Franccesco Petta Date: Wed, 18 Jun 2025 13:19:54 -0400 Subject: [PATCH 04/16] Frank section finished --- script.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/script.js b/script.js index 2ab0ff6..ec8f333 100644 --- a/script.js +++ b/script.js @@ -23,3 +23,15 @@ Ramses // Try rewriting this without using querySelector const header = document.querySelector("#container"); console.log("header", header); + +//Frank Functions +//- [ ] Give the section with an id of container the text "Hello!". +containerByID = document.getElementById("container"); +containerByID.innerText = "hello"; +//- [ ] Add the class main to the div with a class of footer. +footerDiv = document.querySelector(".footer"); +footerDiv.classList.add("main"); +//- [ ] Remove the class main on the div with a class of footer. +footerDiv.classList.remove("main"); +//- [ ] Create a new li element. +newLi = document.createElement("li"); \ No newline at end of file From ec24b3a3586f1765a9ba2761d46d88a7165ef24f Mon Sep 17 00:00:00 2001 From: RamsesCode Date: Wed, 18 Jun 2025 13:23:51 -0400 Subject: [PATCH 05/16] test --- script.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 1978c33..a17a85f 100644 --- a/script.js +++ b/script.js @@ -11,6 +11,8 @@ console.log("Hello! If you see this, the script is working."); - [ ] Remove the class main on the div with a class of footer. - [ ] Create a new li element. + + - [ ] Give the li the text "four". - [ ] Append the li to the ul element. - [ ] Loop over all of the lis inside the ol tag and give them a background color of "green". @@ -21,4 +23,7 @@ console.log("Hello! If you see this, the script is working."); const header = document.querySelector("#container"); console.log("header", header); -//test + +document.getElementById("container").innerHTML =
  • four
  • ; + + From a4e4614622c7cd901258fe45281bc86ec328cdd3 Mon Sep 17 00:00:00 2001 From: Michelangelo Date: Wed, 18 Jun 2025 13:26:52 -0400 Subject: [PATCH 06/16] Initial commit for problems --- script.js | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/script.js b/script.js index 823dd22..497f53b 100644 --- a/script.js +++ b/script.js @@ -1,11 +1,14 @@ console.log("Hello! If you see this, the script is working."); +console.log("Problem 1"); + /* + - [ ] Select the section with an id of container without using querySelector. - [ ] Select the section with an id of container using querySelector. - [ ] Select all of the list items with a class of "second". - [ ] Select a list item with a class of third, but only the list item inside of the ol tag. - +/* - [ ] Give the section with an id of container the text "Hello!". - [ ] Add the class main to the div with a class of footer. - [ ] Remove the class main on the div with a class of footer. @@ -18,5 +21,26 @@ console.log("Hello! If you see this, the script is working."); */ // Try rewriting this without using querySelector -const header = document.querySelector("#container"); -console.log("header", header); +const header = document.getElementById("header"); +header.textContent = "Hello!"; + +const container = document.getElementById("container"); +container.textContent = "Hello!"; + +//Selecting section with id of container using querySelector +console.log("Problem 2"); + +const containerQuery = document.querySelector("#container"); +console.log("containerQuery", containerQuery); + +// Selecting all list items with a class of "second" +console.log("Problem 3"); + +const secondItems = document.getElementsByClassName("second"); +console.log("secondItems", secondItems); + +// Selecting a list item with a class of third, but only the list item inside of the ol tag +console.log("Problem 4"); + +const thirdItem = document.querySelector("ol .third"); +console.log("thirdItem", thirdItem); From fe637182b38daec7313247b6f7e5059acebf3b67 Mon Sep 17 00:00:00 2001 From: Michelangelo Date: Wed, 18 Jun 2025 13:40:41 -0400 Subject: [PATCH 07/16] resolved merge conflict --- script.js | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/script.js b/script.js index 67b8513..1465318 100644 --- a/script.js +++ b/script.js @@ -5,25 +5,16 @@ console.log("Problem 1"); /* <<<<<<< HEAD -======= -Michaelangelo ->>>>>>> 47da39e807c92295200761fab2fa6eafbc03cd24 - [ ] Select the section with an id of container without using querySelector. - [ ] Select the section with an id of container using querySelector. - [ ] Select all of the list items with a class of "second". - [ ] Select a list item with a class of third, but only the list item inside of the ol tag. -<<<<<<< HEAD /* -======= - -Frank ->>>>>>> 47da39e807c92295200761fab2fa6eafbc03cd24 - [ ] Give the section with an id of container the text "Hello!". - [ ] Add the class main to the div with a class of footer. - [ ] Remove the class main on the div with a class of footer. - [ ] Create a new li element. -Ramses - [ ] Give the li the text "four". - [ ] Append the li to the ul element. - [ ] Loop over all of the lis inside the ol tag and give them a background color of "green". @@ -31,12 +22,12 @@ Ramses */ // Try rewriting this without using querySelector -<<<<<<< HEAD -const header = document.getElementById("header"); -header.textContent = "Hello!"; +// Try rewriting this without using querySelector +const header = document.querySelector("#container"); + +const container = document.getElementById("container"); const container = document.getElementById("container"); -container.textContent = "Hello!"; //Selecting section with id of container using querySelector console.log("Problem 2"); @@ -53,21 +44,5 @@ console.log("secondItems", secondItems); // Selecting a list item with a class of third, but only the list item inside of the ol tag console.log("Problem 4"); -const thirdItem = document.querySelector("ol .third"); -console.log("thirdItem", thirdItem); -======= -const header = document.querySelector("#container"); -console.log("header", header); -//Frank Functions -//- [ ] Give the section with an id of container the text "Hello!". -containerByID = document.getElementById("container"); -containerByID.innerText = "hello"; -//- [ ] Add the class main to the div with a class of footer. -footerDiv = document.querySelector(".footer"); -footerDiv.classList.add("main"); -//- [ ] Remove the class main on the div with a class of footer. -footerDiv.classList.remove("main"); -//- [ ] Create a new li element. -newLi = document.createElement("li"); ->>>>>>> 47da39e807c92295200761fab2fa6eafbc03cd24 +const thirdOlItem = document.querySelector("ol .third"); From c0b76c5df715be056efb67f26780e5fe0ce9ebbd Mon Sep 17 00:00:00 2001 From: Franccesco Petta Date: Wed, 18 Jun 2025 13:44:35 -0400 Subject: [PATCH 08/16] temp.js --- temp.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 temp.js diff --git a/temp.js b/temp.js new file mode 100644 index 0000000..4fa83b9 --- /dev/null +++ b/temp.js @@ -0,0 +1,4 @@ +newP = document.createElement('p'); +newP.innerText = "hello"; +containerByID = document.getElementById("container"); +containerByID.appendChild(newP); \ No newline at end of file From 4725c0c36953b589008479b663a8c92a36382aab Mon Sep 17 00:00:00 2001 From: RamsesCode Date: Wed, 18 Jun 2025 13:44:41 -0400 Subject: [PATCH 09/16] first task done --- script.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/script.js b/script.js index 0135c68..0f87289 100644 --- a/script.js +++ b/script.js @@ -13,13 +13,10 @@ Frank - [ ] Remove the class main on the div with a class of footer. - [ ] Create a new li element. -<<<<<<< HEAD -======= Ramses ->>>>>>> origin/main -- [ ] Give the li the text "four". +- [✅] Give the li the text "four". - [ ] Append the li to the ul element. - [ ] Loop over all of the lis inside the ol tag and give them a background color of "green". - [ ] Remove the div with a class of footer. @@ -29,12 +26,9 @@ Ramses const header = document.querySelector("#container"); console.log("header", header); -<<<<<<< HEAD -document.getElementById("container").innerHTML =
  • four
  • ; -======= //Frank Functions //- [ ] Give the section with an id of container the text "Hello!". containerByID = document.getElementById("container"); @@ -46,4 +40,11 @@ footerDiv.classList.add("main"); footerDiv.classList.remove("main"); //- [ ] Create a new li element. newLi = document.createElement("li"); ->>>>>>> origin/main + + + +//Ramses Functions + +const newLi = document.createElement("li"); +newLi.textContent = "four"; +document.querySelector("ul").appendChild(newLi) \ No newline at end of file From bd127cc17a423395a8601e5a58705eb43ce90925 Mon Sep 17 00:00:00 2001 From: Franccesco Petta Date: Wed, 18 Jun 2025 13:49:27 -0400 Subject: [PATCH 10/16] fixed hello added --- script.js | 4 +++- temp.js | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 temp.js diff --git a/script.js b/script.js index ec8f333..7030db1 100644 --- a/script.js +++ b/script.js @@ -26,8 +26,10 @@ console.log("header", header); //Frank Functions //- [ ] Give the section with an id of container the text "Hello!". +newP = document.createElement('p'); +newP.innerText = "hello"; containerByID = document.getElementById("container"); -containerByID.innerText = "hello"; +containerByID.appendChild(newP); //- [ ] Add the class main to the div with a class of footer. footerDiv = document.querySelector(".footer"); footerDiv.classList.add("main"); diff --git a/temp.js b/temp.js deleted file mode 100644 index 4fa83b9..0000000 --- a/temp.js +++ /dev/null @@ -1,4 +0,0 @@ -newP = document.createElement('p'); -newP.innerText = "hello"; -containerByID = document.getElementById("container"); -containerByID.appendChild(newP); \ No newline at end of file From 6d77f6b10ceda7fe8249325f9434b961c3272374 Mon Sep 17 00:00:00 2001 From: Franccesco Petta Date: Wed, 18 Jun 2025 13:56:51 -0400 Subject: [PATCH 11/16] rename my file --- script.js => fransScript.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename script.js => fransScript.js (100%) diff --git a/script.js b/fransScript.js similarity index 100% rename from script.js rename to fransScript.js From 7a8a01ad41a8469fa354ea322686b0582d167681 Mon Sep 17 00:00:00 2001 From: Franccesco Petta Date: Wed, 18 Jun 2025 14:01:04 -0400 Subject: [PATCH 12/16] . --- script.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 script.js diff --git a/script.js b/script.js new file mode 100644 index 0000000..e69de29 From f9b5c91a9783053de230b1c3cc60b748646247a8 Mon Sep 17 00:00:00 2001 From: RamsesCode Date: Wed, 18 Jun 2025 14:03:34 -0400 Subject: [PATCH 13/16] testing --- script.js | 6 +++--- temp.js | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 temp.js diff --git a/script.js b/script.js index 0f87289..fa1a636 100644 --- a/script.js +++ b/script.js @@ -17,14 +17,14 @@ Frank Ramses - [✅] Give the li the text "four". -- [ ] Append the li to the ul element. +- [✅] Append the li to the ul element. - [ ] Loop over all of the lis inside the ol tag and give them a background color of "green". - [ ] Remove the div with a class of footer. */ // Try rewriting this without using querySelector -const header = document.querySelector("#container"); -console.log("header", header); +//const header = document.querySelector("#container"); +//console.log("header", header); diff --git a/temp.js b/temp.js new file mode 100644 index 0000000..4fa83b9 --- /dev/null +++ b/temp.js @@ -0,0 +1,4 @@ +newP = document.createElement('p'); +newP.innerText = "hello"; +containerByID = document.getElementById("container"); +containerByID.appendChild(newP); \ No newline at end of file From a2c303ce8e3e84e8a82d51f3fec9a8ff0df5f2bb Mon Sep 17 00:00:00 2001 From: Franccesco Petta Date: Wed, 18 Jun 2025 14:05:43 -0400 Subject: [PATCH 14/16] combine --- fransScript.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/fransScript.js b/fransScript.js index 7030db1..7311c93 100644 --- a/fransScript.js +++ b/fransScript.js @@ -36,4 +36,17 @@ footerDiv.classList.add("main"); //- [ ] Remove the class main on the div with a class of footer. footerDiv.classList.remove("main"); //- [ ] Create a new li element. -newLi = document.createElement("li"); \ No newline at end of file +newLi = document.createElement("li"); + +//- [ ] Give the li the text "four". +newLi.innerText = "four"; +//- [ ] Append the li to the ul element. +ulElement = document.querySelector('ul'); +ulElement.appendChild(newLi); +//- [ ] Loop over all of the lis inside the ol tag and give them a background color of "green". +olLis = document.querySelectorAll("ol li"); +olLis.forEach(li => { + li.style.backgroundColor = "green"; +}); +//- [ ] Remove the div with a class of footer. +footerDiv.remove(); \ No newline at end of file From f72e226a6d99b59d6c97388008f5c120f003c050 Mon Sep 17 00:00:00 2001 From: Franccesco Petta Date: Wed, 18 Jun 2025 14:07:28 -0400 Subject: [PATCH 15/16] combine mick and frank branch --- fransScript.js | 52 -------------------------------------------------- script.js | 27 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 52 deletions(-) delete mode 100644 fransScript.js diff --git a/fransScript.js b/fransScript.js deleted file mode 100644 index 7311c93..0000000 --- a/fransScript.js +++ /dev/null @@ -1,52 +0,0 @@ -console.log("Hello! If you see this, the script is working."); - -/* -Michaelangelo -- [ ] Select the section with an id of container without using querySelector. -- [ ] Select the section with an id of container using querySelector. -- [ ] Select all of the list items with a class of "second". -- [ ] Select a list item with a class of third, but only the list item inside of the ol tag. - -Frank -- [ ] Give the section with an id of container the text "Hello!". -- [ ] Add the class main to the div with a class of footer. -- [ ] Remove the class main on the div with a class of footer. -- [ ] Create a new li element. - -Ramses -- [ ] Give the li the text "four". -- [ ] Append the li to the ul element. -- [ ] Loop over all of the lis inside the ol tag and give them a background color of "green". -- [ ] Remove the div with a class of footer. -*/ - -// Try rewriting this without using querySelector -const header = document.querySelector("#container"); -console.log("header", header); - -//Frank Functions -//- [ ] Give the section with an id of container the text "Hello!". -newP = document.createElement('p'); -newP.innerText = "hello"; -containerByID = document.getElementById("container"); -containerByID.appendChild(newP); -//- [ ] Add the class main to the div with a class of footer. -footerDiv = document.querySelector(".footer"); -footerDiv.classList.add("main"); -//- [ ] Remove the class main on the div with a class of footer. -footerDiv.classList.remove("main"); -//- [ ] Create a new li element. -newLi = document.createElement("li"); - -//- [ ] Give the li the text "four". -newLi.innerText = "four"; -//- [ ] Append the li to the ul element. -ulElement = document.querySelector('ul'); -ulElement.appendChild(newLi); -//- [ ] Loop over all of the lis inside the ol tag and give them a background color of "green". -olLis = document.querySelectorAll("ol li"); -olLis.forEach(li => { - li.style.backgroundColor = "green"; -}); -//- [ ] Remove the div with a class of footer. -footerDiv.remove(); \ No newline at end of file diff --git a/script.js b/script.js index 1465318..beeb3c3 100644 --- a/script.js +++ b/script.js @@ -46,3 +46,30 @@ console.log("Problem 4"); const thirdOlItem = document.querySelector("ol .third"); + +//Frank Functions +//- [ ] Give the section with an id of container the text "Hello!". +newP = document.createElement('p'); +newP.innerText = "hello"; +containerByID = document.getElementById("container"); +containerByID.appendChild(newP); +//- [ ] Add the class main to the div with a class of footer. +footerDiv = document.querySelector(".footer"); +footerDiv.classList.add("main"); +//- [ ] Remove the class main on the div with a class of footer. +footerDiv.classList.remove("main"); +//- [ ] Create a new li element. +newLi = document.createElement("li"); + +//- [ ] Give the li the text "four". +newLi.innerText = "four"; +//- [ ] Append the li to the ul element. +ulElement = document.querySelector('ul'); +ulElement.appendChild(newLi); +//- [ ] Loop over all of the lis inside the ol tag and give them a background color of "green". +olLis = document.querySelectorAll("ol li"); +olLis.forEach(li => { + li.style.backgroundColor = "green"; +}); +//- [ ] Remove the div with a class of footer. +footerDiv.remove(); From bc57e2968c60b4c3b5279a673be476fe47e173aa Mon Sep 17 00:00:00 2001 From: RamsesCode Date: Wed, 18 Jun 2025 14:20:47 -0400 Subject: [PATCH 16/16] . --- script.js | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/script.js b/script.js index b159fff..4738e33 100644 --- a/script.js +++ b/script.js @@ -24,12 +24,9 @@ Ramses - [ ] Remove the div with a class of footer. */ -// Try rewriting this without using querySelector + // Try rewriting this without using querySelector const header = document.querySelector("#container"); - - -const container = document.getElementById("container"); const container = document.getElementById("container"); //Selecting section with id of container using querySelector @@ -49,30 +46,3 @@ console.log("Problem 4"); const thirdOlItem = document.querySelector("ol .third"); - -//Frank Functions -//- [ ] Give the section with an id of container the text "Hello!". -newP = document.createElement('p'); -newP.innerText = "hello"; -containerByID = document.getElementById("container"); -containerByID.appendChild(newP); -//- [ ] Add the class main to the div with a class of footer. -footerDiv = document.querySelector(".footer"); -footerDiv.classList.add("main"); -//- [ ] Remove the class main on the div with a class of footer. -footerDiv.classList.remove("main"); -//- [ ] Create a new li element. -newLi = document.createElement("li"); - -//- [ ] Give the li the text "four". -newLi.innerText = "four"; -//- [ ] Append the li to the ul element. -ulElement = document.querySelector('ul'); -ulElement.appendChild(newLi); -//- [ ] Loop over all of the lis inside the ol tag and give them a background color of "green". -olLis = document.querySelectorAll("ol li"); -olLis.forEach(li => { - li.style.backgroundColor = "green"; -}); -//- [ ] Remove the div with a class of footer. -footerDiv.remove();