Trying to figure out why node list is coming back empty.

Trying to learn pagination. In the prevButton I am trying to loop over all the buttons I created in the createNumberButton functions. The node list comes back empty. Is this because the way I currently have code order set up, the nodes are not created before I try refencing it? https://codepen.io/bsups/pen/rNqYvMV
Brandon
CodePen
rNqYvMV
...
4 Replies
Chris Bolson
Chris Bolson•2y ago
Have you fixed this? In your codepen it is showing the list of items.
b_sups
b_supsOP•2y ago
Yeah it is showing, still have not figured out the issue. Everything is working I want to accept, the previous button changing to the active number button. I am trying to reference the number buttons which I made in the other function and gave a class. But the list comes back empty. document.querySelectorAll(".numbrButtons"); And I just figured it out, simple human error.
Chris Bolson
Chris Bolson•2y ago
was it a spelling mistake on "numbrButtons" ? 😆
b_sups
b_supsOP•2y ago
...yes Sadly, I rewrote it multiple times. Can't blame VS code since it doesn't bring autofill options between parathesis.

Did you find this page helpful?