I have my calculator project finished for the most part. Here’s what I have so far:
var elem = document.querySelectorAll(".button2");
I would like to target the entire button by targeting the div element the span is inside, but I can’t target the div with the querySelectorAll() function i.e. passing “button” (which is the div’s class) doesn’t work:
var elem = document.querySelectorAll(".button");
How do I target a div with querySelectorAll? Or do I need to use a different function for that?