so, I’m nearing the end of an old project I was working on and I can’t seem to reset the app correctly.
if you fail the quiz a reset button will display allowing you to reset the quiz. However, the functionality of the buttons do not work after the quiz is reset. I can’t figure out what the problem is here. Any hints would be greatly appreciated!
Your reset button creates html with a new button that needs to be clicked to start the quiz. The new button does not have an event listener attached to it.
I would strongly recommend you rethink your quiz design here. You already have everything set up (html and event listeners) when the page loads. Instead of constantly overwriting the inner HTML of quizBoardContainer, I would create a separate element that displays the questions and then hide/unhide it. Then, for each question, you would just update the h1, the span containing the seconds left, the h2 containing the question, and the span which shows the correct answers value.