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
4 Replies
Have you fixed this? In your codepen it is showing the list of items.
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.
was it a spelling mistake on "numbrButtons" ? 😆
...yes
Sadly, I rewrote it multiple times. Can't blame VS code since it doesn't bring autofill options between parathesis.