Skip to content

Commit

Permalink
Completed bonus missions LaunchCodeEducation#2 and LaunchCodeEducation#3
Browse files Browse the repository at this point in the history
  • Loading branch information
DuxVictorum committed Jul 27, 2021
1 parent 264a4cd commit aca35a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<body>
<script src="script.js"></script>
<h1>Astronauts</h1>
<h2 id="astroCount">Total Number of Astronauts: </h2>
<div id="container">
<!-- List of astronauts will be added here dynamically -->
</div>
Expand Down
11 changes: 9 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@ window.addEventListener("load", event => {
</div>
<img class="avatar" src="${json[i].picture}">
</div>`

}
}

const actives = document.querySelectorAll("li");
for (bits of actives) {
if (bits.innerText === "Active: true") {
bits.setAttribute("style", "color: green");
};
};

document.getElementById("astroCount").innerText += json.length;
})
})
})

0 comments on commit aca35a7

Please sign in to comment.