I'm trying to figure out how to refresh my page every time a door is clicked. Can anyone help me with where I should add window.location.reload(); in my code?
Here's the link to my pen:
https://codepen.io/tacodestroyer/pen/bROpeQ
function openDoor(field) {
var y = $(field).find(".thumb");
var x = y.attr("class");
if (y.hasClass("thumbOpened")) {
y.removeClass("thumbOpened");
}
else {
$(".thumb").removeClass("thumbOpened");
y.addClass("thumbOpened");
}
}
Any suggestions would be greatly appreciated!