You might store the initial
.innerHTML of the
div in a variable, and restore it later like so:
var game = document.querySelector('.game')
var initial = game.innerHTML
game.innerHTML = initial
That's kind of a hard reset -- it will completely replace all previous elements in that
div, so you'll lose all added event listeners etc. as well. I have to say that this doesn't seem like a particularly clean solution to me though... it might get quite messy with the JS.
Unfortunately there's no code in your fiddle, but IIUC you're dynamically changing the image sources and want to revert that... so wouldn't it be possible to have all different images on the page from the start, and just show/hide them with certain classes instead?