I want to hide a div using a button, and at the same time make it reappear when I click on it again.
<div id='ocultar-y-mostrar'>CONTENIDO</div>
<button id='ocultar-mostrar'><i class="fas fa-bars"></i></button>
How do I do it?
I want to hide a div using a button, and at the same time make it reappear when I click on it again.
<div id='ocultar-y-mostrar'>CONTENIDO</div>
<button id='ocultar-mostrar'><i class="fas fa-bars"></i></button>
How do I do it?
From W3School :
Hello, how are you searching the web and found how to do them with js:
With JQuery you can do it this way:
You can also use the css visibility property and change it with javascript