Skip to content

Commit

Permalink
Desactiva el scroll vertical
Browse files Browse the repository at this point in the history
  • Loading branch information
mrp500 committed Feb 28, 2024
1 parent d82c1b6 commit 9bdc9b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 9 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ let intentos = 0;
let listaNumerosSorteados = [];
let numeroMaximo = 10;

// Deshabilitar el desplazamiento vertical en dispositivos móviles
document.addEventListener('DOMContentLoaded', function () {
if (window.matchMedia("(max-width: 767px)").matches) {
document.body.style.overflowY = 'hidden';
}
});


function asignarTextoElemento(elemento, texto) {
let elementoHTML = document.querySelector(elemento);
elementoHTML.innerHTML = texto;
Expand Down Expand Up @@ -69,4 +77,4 @@ function reiniciarJuego() {
document.querySelector('#reiniciar').setAttribute('disabled','true');
}

condicionesIniciales();
condicionesIniciales();
4 changes: 0 additions & 4 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,4 @@ button {
padding-bottom: 0;
}

body {
overflow-y: hidden;
}

}

0 comments on commit 9bdc9b5

Please sign in to comment.