button js - JAVASCRIPT 0.65 KB
                                
                                    const startBtn = document.querySelector(".start-game");
const game = document.querySelector(".game");
const active = document.querySelector(".active");
const nav = document.querySelector(".container__nav");
const iBox = document.querySelector(".i-box");

startBtn.addEventListener("click", function() {
    game.classList.toggle("active");
    startBtn.classList.toggle("deactive");
    nav.classList.toggle("deactive")
});

iBox.addEventListener("click", function() {
    nav.classList.toggle("container__nav-active");
})
                                
                            

Paste Hosted With By Wklejamy.pl