Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

172
Vistas
Why Isn't My Button Event Being Triggered After The First Try

I am making a game and right now I'm trying to make a save feature and I have made it so you can click out of it, but my problem is when you click on the button again the screen doesn't work. Can you please help me out

Javascript

function savingGame() {
  document.getElementById('saveScreen').style.display = "block"
  document.getElementById('content').style.marginTop = '-83vh';
}

function saveGame1() {
  if (localStorage.getItem('save1') != null) {
    overwriteAlert();
  } else {
    localStorage.setItem('save1', index)
    alert('gameSaved');
    saveScreen.style.display = "none"
    content.style.marginTop = "-3vh"
  }
}

function noSave() {
  if (window.getComputedStyle(saveScreen).display == "block") {
    document.getElementById('content').onclick = function() {
      saveScreen.style.display = "none"
      content.style.marginTop = "-3vh"
    }
  }
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda