Hi, i want to add a css color class to an already existing classname value, how do i do that..
here is what i have
the childNodes look like this
NodeList(6) [text, h3, text, div, text, button#togglePark.fas.fa-parking]
so i know the child i want is #5
console.log(section.childNodes[5]);
// <button type="button" class="fas fa-parking" id="togglePark"></button>
in my css
.parkred {
color: #ff949b; /* lt red */
}
and here is my code but it tells me that parkred does not exist
section.childNodes[5].className += " " + parkred;
is the syntax wrong?
thanks