How can I do the following:
I have several DIVS
<div style="background-color: black;">text1</div>
<div style="background-color: black;">text2</div>
<div style="background-color: black;">text3</div>
<div style="background-color: black;">text4</div>
<div style="background-color: black;">text5</div>
<div style="background-color: black;">text6</div>
When someone is clicking on the DIV with text5, the background colour needs to change to RED.
When that same person is clicking on DIV with text 3, the background colour of text5 need to go back to black en text3 should get the background color to RED. And so on with the other DIVS.
So the background colour needs to change when someone is cliking on another DIV.
Is this possible with a simple javascript?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…