javascript bug | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
- 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 Réponses
+ 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