revert Merge branch 'main' of https://git.desarrolloalcala.com/jorge/triviagmatico
This commit is contained in:
2026-10-01 11:15:10 +02:00
parent e3395a017c
commit cd0685f41c
11 changed files with 946 additions and 162 deletions
+2 -14
View File
@@ -20,18 +20,7 @@ let bloqueado = false; // true mientras se envía una respuesta o se ve el feedb
let numeroAciertos = 0; // número de aciertos del jugador
$(document).ready(function () {
// Obtenemos el idPartida de la URL
// Ejemplo: juego.php?idPartida=3
const parametros = new URLSearchParams(window.location.search);
idPartida = parseInt(parametros.get("idPartida"), 10);
if (!idPartida || idPartida < 1) {
mostrarError("La partida indicada no es válida.");
return;
}
idPartida = parseInt($("body").data("id-partida"), 10);
// Un solo listener para todos los botones de respuesta
$("#respuestas").on("click", ".btn-answer", function () {
@@ -114,7 +103,6 @@ function responder($botonPulsado) {
if (bloqueado) {
return;
}
bloqueado = true;
const pregunta = preguntas[indice];
@@ -228,4 +216,4 @@ function mostrarError(mensaje) {
$("#feedback").html(
'<a href="buscadorSala.php">Volver al buscador de salas</a>',
);
}
}