Answer the question
In order to leave comments, you need to log in
How to create show/hide without using toggle?
Hello
There is a code - fiddle
How to create show/hide
when clicking on the same button without using toggle
?
Answer the question
In order to leave comments, you need to log in
btn.addEventListener('click', (event) => {
block.classList.contains('active') ? hide() : show();
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question