+ 1

How can I correct this?

Hello everyone. I am stuck once again😖😖. I have set up 2 buttons and want to display them once my choose character screen is showing, but it is giving me an error when i use the style.display. The problem is on line 120 and 121. I would really like some advice. Thank you in advance😊😊 https://code.sololearn.com/W3g2OUh39tcw/?ref=app

7th Feb 2018, 3:51 AM
Reuinte' Howard
12 odpowiedzi
+ 6
Yes, when multiple items share the same class. Instead of doing it twice there, it could make sense to use one class and loop.
7th Feb 2018, 4:23 AM
John Wells
John Wells - avatar
+ 9
Why is it vibrating?
7th Feb 2018, 4:29 AM
Bohdan Sakovych
Bohdan Sakovych - avatar
+ 8
Code in tiny pieces you prove work and you can quickly get through the task.
7th Feb 2018, 4:38 AM
John Wells
John Wells - avatar
+ 7
I do the same with an alert for the same reason.
7th Feb 2018, 4:34 AM
John Wells
John Wells - avatar
+ 6
getElementsByClassName returns a list of elements. Add a [0] to get the first one.
7th Feb 2018, 4:15 AM
John Wells
John Wells - avatar
+ 3
just a shot in the dark. Does 'block' need double quotes? else...ignore me lol
7th Feb 2018, 3:58 AM
Tim Millar
Tim Millar - avatar
+ 3
I just wanted to add something to make the buttons do something, until i add the actual function to it. Kind of silly, but it made me feel better knowing the the button does something😂😂
7th Feb 2018, 4:32 AM
Reuinte' Howard
+ 2
thankyou soo much, that really helped and i learned something new. for loops could be used with this type of situation as well then right?
7th Feb 2018, 4:21 AM
Reuinte' Howard
+ 2
That will definately come in handy. Thank you😝😝
7th Feb 2018, 4:26 AM
Reuinte' Howard
+ 2
haha it really helps for some reason doesn't it?
7th Feb 2018, 4:37 AM
Reuinte' Howard
+ 1
I had the same thought about the double quotes😂😂, but it can be single. Thankyou for your suggestion though😊😊
7th Feb 2018, 4:07 AM
Reuinte' Howard
+ 1
So true
7th Feb 2018, 4:42 AM
Reuinte' Howard