+ 1
Need help with JavaScript.
So this is my code at present: https://code.sololearn.com/WEE9mZOZctgh/?ref=app Is anyone able to answer me why the checkarray (line 34) is returning a zero length? I've tried switching the querySelectorAll command with getElementsByClassName with no success. This is my second day on this issue now and I've googled/tried everything I can think of. Thanks in advance for your help. As an aside: can anyone using SoloLearn on an iPad verify if they get any alert at all? iPhone: alert shows, iPad: nothing.
6 Respostas
+ 1
The answer is simple... You set wrong attribute.... class attr not exists in js element when you creating a new attribute for that object... Set the "className" attribute or if you want set a list of class for element "classList"
+ 2
Great, thanks. It should have been span2.className = ...
+ 2
I post a list of useful resources for learnand reference:
https://code.sololearn.com/WaVusr8J1KvK/?ref=app
+ 2
That's a great list. Thanks for sharing!
0
👍👍👍
0
👍👍👍