button js
Guest 1,991 14th Mar, 2021
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");
})
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
- Как повлияла пандемия на куринные крылышки
Dart | 1 | 2 minutes ago
- Wanted to apprehend what your conception is on this point
Smarty | 3 | 1 hour ago
- Untitled
Markup | 15 | 6 hours ago
- Untitled
Markup | 13 | 6 hours ago
- Автосервис Ярославль
Bro | 104 | 6 hours ago
- Untitled
C# | 15 | 11 hours ago
- Untitled
Markup | 14 | 13 hours ago