I would like to create a button dynamically using JavaScript and jQuery.
The code below is the final piece to a quiz and when the quiz is finished, it gives the results and states you have finished. I would like to create a button dynamically using JS during this time which takes the user back to the home page (index.html).
Any help is greatly appreciated.
function displayFinalSlide(){
$(stage).append('<div class="questionText">You have finished the quiz!<br><br>Total questions: '+numberOfQuestions+'<br>Correct answers: '+score+'</div>');
}//display final slide