Answer the question
In order to leave comments, you need to log in
How to collapse a column in bootstrap?
There is the following structure. How can I hide the menu when I press the button?
<div class="row">
<div class="col-lg">контент <button>Скрыть меню</button></div>
<div class="col-lg-4">меню </div>
</div>
Answer the question
In order to leave comments, you need to log in
<div class="row">
<div class="col-lg">контент <button id=menuToggle>Скрыть меню</button></div>
<div class="col-lg-4" id=menu>меню </div>
</div>
<script>
document.getElementById('menuToggle').addEventListener('click', ()
=> document.getElementById('menu').classList.toggle('d-none'));
</script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question