javascript bug | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

javascript bug

Iā€™m beginner in JavaScript and a canā€™t summarize my code and I donā€™t know if is possible. I built two drop boxes that apear when you click on it. But the else if condition doesnā€™t work when the first load happens, I mean, when you click on one div and after the other div , the first one doesnā€™t desapear. Can someone help me with this bug ?

21st Jun 2019, 5:36 PM
Matheus Rodrigues
Matheus Rodrigues - avatar
3 Answers
+ 6
Where is the code ?
21st Jun 2019, 5:42 PM
Ayan Fox
Ayan Fox - avatar
+ 4
Show me everything dude !! You've created two functions but didn't called any of those. If you're trying to create a div, then use document.createElement()
22nd Jun 2019, 11:40 AM
Ayan Fox
Ayan Fox - avatar
- 1
I putted only the js, do you want the html/css ? https://code.sololearn.com/WNMEtcKXYbeC/?ref=app
21st Jun 2019, 6:56 PM
Matheus Rodrigues
Matheus Rodrigues - avatar