1 parent 6b8818d commit 097165cCopy full SHA for 097165c
1 file changed
src/js/main.js
@@ -106,11 +106,14 @@ function deleteQuiz(name) {
106
localStorage.removeItem(name);
107
fetchQuizList();
108
}
109
+ if ( name == $("#quiz-name").text() ) {
110
+ $("#quiz-window").empty();
111
+ }
112
113
114
function startQuiz(name) {
115
let startScreen = `
- <h2>${name}</h2>
116
+ <h2 id="quiz-name">${name}</h2>
117
<button class = "btn" id = "begin-btn">Begin</button>
118
`;
119
$("#quiz-window").html(startScreen);
0 commit comments