I'm trying to change the color of a DIV Element that's assigned to the class about_title, with the condition of another div to have a display of "block", which id is about. This is my JS code:
let about_title = document.getElementsByClassName("about_title") ;
let about_content = document.getElementById("about") ;
if (about_content.style.display == "block") {
about_title.style.backgroundColor = "#ced2ff" ;
} ;
It doesn't work and I can't get it done