I want that part 1 onclick div style changes and part 2 again on click it comes back to normal. I tried doing so but I failed to achieve the
part 1
part 2
you may check the color before you click to change it.
function abc(){ var color = document.getElementById("test").style.color; if(color==''){ //change }else{ //change back } }