Changing attributes with click and querySelector not fully functioning

I’ve written this to change the background of a div that represents hours on a daily planner. The first instance (onclick) works but the others don’t. Do I need to give each .container their own id and their own function?

var changeStatus = document.querySelector("#changeStatus");
var container = document.querySelector(".container");

changeStatus.addEventListener("click", function () {
  container.setAttribute("class", "filled");

119 thoughts on “Changing attributes with click and querySelector not fully functioning”

  1. therapies cognitivo-comportementales pdf therapies kidney , therapies meaning pharmacie beaulieu horaires , [url=]Buspar vente libre[/url] pharmacie yenne [url=]Copegus vente libre[/url] , pharmacie ouverte fleurance therapie cognitivo comportementale valenciennes , therapie de couple cholet. pharmacie auchan tours nord therapie cognitivo comportementale wikipedia [url=]Zyrtec vente libre[/url] , pharmacie petit auchan woippy. pharmacie victor hugo, medicaments infection urinaire pharmacie bourges ouverte lundi . pharmacie d’anjou angers, pharmacie clarines annecy le vieux pharmacie amiens sud burger king pharmacie en ligne suisse zur rose .

  2. i need home loan with bad credit, i need an emergency loan now. i need a loan my credit is bad need loan now need a loan i need a loan help please, cash advance loans colorado springs, cash advance, cash advances, payday advance loans without bank account. Money lending to money management, financial institution .


Leave a Comment