Skip to content

Commit f92fd8a

Browse files
committed
added changes
1 parent 68ce470 commit f92fd8a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

010-dad jokes/index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ <h3>Don't Laugh Challenge</h3>
1616
<br><br><br>
1717
<div id="container2" class="container">
1818
<h3>Don't Laugh Challenge: Computer Science Edition</h3>
19-
<div id="csJoke" class="joke">// Joke goes here</div>
20-
<button class="btn" onclick="generateCSJoke();">Get Another Joke</button>
19+
<div id="csJoke" class="joke">Click the button for a Computer Science joke!</div>
20+
<button id="csJokeBtn" class="btn" onclick="generateCSJoke();">Get Another Joke</button>
2121
</div>
2222
<script language="JavaScript">
2323
var jokes = ["What did the hungry computer scientist do? Get a byte to eat!",
@@ -34,7 +34,8 @@ <h3>Don't Laugh Challenge: Computer Science Edition</h3>
3434
jokeDiv.setAttribute("class", "joke");
3535
const jokeContent = document.createTextNode(jokes[i]);
3636
jokeDiv.appendChild(jokeContent);
37-
document.getElementById('container2').appendChild(jokeDiv);
37+
var csJokeButton = document.getElementById("csJokeBtn");
38+
document.getElementById('container2').insertBefore(jokeDiv, csJokeButton);
3839
}
3940
</script>
4041
</body>

0 commit comments

Comments
 (0)