Delay in hiding multiple elements?

Thank you for your help, looks like multi-state box did the trick. Though now I’m stuck trying to change the color of the text button on click. I tried referring to the API reference but for some reason it says property of HTML does not exist with the code I use.