Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-pablo authored Nov 18, 2024
1 parent 7623610 commit 22a199a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SCRIPTS/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function cprint(str){
const menu = document.querySelector("#menu");
const botaoMenu = document.querySelector("#botaoMenu");
const animationFramesCount = 10;
const body = document.querySelector("body");

// variáveis importantes para controlar a animação do menu
let mostrar = false;
Expand All @@ -72,6 +73,8 @@ function cprint(str){
// função a ser executada toda vez que o botão de abrir menu for pressionado
botaoMenu.addEventListener('click', () => {

body.style.overflow = 'hidden';

mostrar = !mostrar;

if (mostrar == true) {
Expand Down Expand Up @@ -117,6 +120,8 @@ function cprint(str){
posição = "-var(--width)";

}

body.style.overflow = 'auto';
}

else if(mostrar == true && posição > 0){
Expand Down

0 comments on commit 22a199a

Please sign in to comment.