N
N
nen0y2020-07-28 14:50:12
css
nen0y, 2020-07-28 14:50:12

How to hide block on click?

How to hide block on click?

By clicking on the "S / H MENU", the navigation block should go to the left, so that it becomes invisible, after pressing it again, the menu should go back. How to do it?

https://codepen.io/5dc8b3/pen/GRoaveq

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Vasilev, 2020-07-28
@nen0y

as an option:

V
Vovash, 2020-07-28
@V0vash

one option is to use Animate

Z
zx5zx6, 2020-07-28
@zx5zx6

The easiest way is to change the css value of the display property on click.
You can bind to any html object.
And in the function there is a check:
If some div is not hidden when clicked, then hide it, and if it is already hidden, then show it.
For example:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question