document.getElementsByClassName() isn't searching through the whole document

I’m trying to use it to search for a specific div in a document, but it doesn’t seem like it’s searching through all of it. The document has HTML tags within HTML tags, and it finds everything contained in the outer ones fine, while it can’t return anything from the inner ones. I’ve tried searching for ID and even tried with other elements, it’s not returning anything from the inner ones. Any advice?

Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.