Answer the question
In order to leave comments, you need to log in
How to add a class and remove it when clicking on an object?
Here is the code with header and menu:
<div class="container">
<h4>Roma Tuzov</h4>
<i class="fas fa-align-right"></i>
</div>
<div class="nav-open menu-disable">
<div class="container">
<div class="contact">
<h3>Связаться</h3>
<p>
[email protected]
</p>
</div>
<div class="social">
<h3>Я в соц. сетях</h3>
<a href="#" target="_blank"><i class="fab fa-instagram"></i></a>
<a href="#" target="_blank"><i class="fab fa-vk"></i></a>
<a href="#" target="_blank"><i class="fab fa-telegram"></i></a>
</div>
</div>
</div>
.menu-disable {
transform: translateY(-105%);
}
Answer the question
In order to leave comments, you need to log in
Well, this is what he wrote in half a minute:
var i = //получаете i
var menu = //получаете menu
i.onclick = function(e){
menu.classList.remove('menu-disable');
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question