0
Good, I’m making a game in HTML5 + CSS3 + Javascript and I’m in the initial menu. I wanted the button before redirecting the page to make an animation. The animation part is working fine, but once I enter the code part to redirect the page, it stops running the animation. Anyone know how to help? Below I leave the code part in Javascript.
function ajuda(){
this.style.backgroundPosition = "right";
var sombotao = document.getElementById("sombotao");
sombotao.play();
window.location.href="ajuda.html";
}