0

Code not Working Why? JS

Variable.style.display does totally nothing https://code.sololearn.com/WEm88EX7Xxfz/?ref=app

17th Aug 2019, 8:58 AM
MightyJohn
MightyJohn - avatar
5 Answers
+ 3
https://code.sololearn.com/WtXvNScYA51Z/?ref=app
17th Aug 2019, 9:09 AM
BroFar
BroFar - avatar
+ 2
Hello. For display, it is not "show". You should use instead "block" And at the else, use "none"
17th Aug 2019, 9:05 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
+ 2
Like this: function myFunction(){ if (x.style.display === "none") { x.style.display = "block"; } else { x.style.display = "none"; } }
17th Aug 2019, 9:05 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
+ 1
BroFarOps Thank you i love you i was so dumb
17th Aug 2019, 9:26 AM
MightyJohn
MightyJohn - avatar
0
💜 Alex Tusinean 🍇 Thank you very much for answering!!
17th Aug 2019, 9:59 AM
MightyJohn
MightyJohn - avatar