Closed avalant closed 7 years ago
Instead of .append
i would try .html
and switch the question out entirely. That way your next and previous buttons just replace all of the content. Looks like your questions/answers are living in array, should be able to transition that.
I've tried .append and the choices load, but when going to the next question the choices continue to append below the previous questions choices. I've tried .html but, it loads the "green1" or the last option of the options array. I have also tried .innerHTML and received an error that it wasn't a function. I've tried storing my choices in a variable with the hopes I could use .innerHTML and nothing has appeared. My repo link is https://github.com/avalant/wdi13_project1_trivia and my question is about lines 36 - 40 in script.js.