Question about hiding <div> elements | Sololearn: Learn to code for FREE!

0

Question about hiding <div> elements

Hi guys! How can I make it possible to open only one "id" element at a time? For example: I open <div id = "a1"> Then I open <div id = "b1"> at this point <div id = "a1"> must be closed automatically. How to do this? Thank you. https://code.sololearn.com/WPfC7s5iV45i/?ref=app

9/27/2018 6:18:56 PM

Sergei Isáichenko

4 Answers

New Answer

+2

Some ways: https://code.sololearn.com/WN8Yrr1XU9v6/?ref=app https://code.sololearn.com/WOp2LwlbaUzs/?ref=app

+2

You're very welcome. 🙂

+1

Janning, Thank you so much;)

0

Another way to do this. Explanations in Russian, but the code in English, of course: https://webcareer.ru/pereklyuchatel-vkladok-na-jquery.html#comment-613