I have the following question? i have some divs and I want them to change background colors when i click on it. I have been searching on the internet and tried somethings out. now i can change the background color but i can't switch it back to the beginning. This is was I got so far. how can i make it so that it will toggle on each click. so first click, it turns black. second, it will turn white again and so on.
<title>Nieuwe pagina 2</title>
border: 1px dashed #FF0000;
function turn($div, $kleur)
var div = document.getElementById($div);
div.style.background = "#ffffff";