0

please help, why querySelectorAll not working, and even get element by class name also not working,

https://code.sololearn.com/WwHph2qXu1kz/?ref=app

27th Aug 2020, 2:11 PM
th35kyb0y
th35kyb0y - avatar
3 Answers
+ 3
querySelectorAll() and getElementsByClass() returns array like object. To access individual element you need to provide index. a[0].style.display="none"
27th Aug 2020, 2:13 PM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
+ 2
th35kyb0y , You are welcome :)
27th Aug 2020, 2:18 PM
šŸ‡®šŸ‡³OmkaršŸ•‰
šŸ‡®šŸ‡³OmkaršŸ•‰ - avatar
0
šŸ‡®šŸ‡³OmkaršŸ•‰ thanks bro now it's working, I forgot the basics
27th Aug 2020, 2:15 PM
th35kyb0y
th35kyb0y - avatar