The problem is that you are setting the color like this:
home.style.backgroundColor = '#FD7C7C';
And then checking the color if it is complete like:
if(va.style.backgroundColor == '#FD7C7C') {
Now, one would think this would be correct, but the browser under-the-hood is changing the backgroundColor value to rgb(253, 124, 124)
so the check is failing.
The original code used ‘green’ as its value, which browsers apparently decide to preserve.
So the fix would to be to check via other means that is not up to the browser’s interpretation. In fact, the code is already filtering by the ‘used’ class name, so I do not know why this check exists at all (perhaps there is a reason I do not see). You could probably try removing the conditional and test it out to see if it works. I’ve done so here:
Andrew’s app-fixed.hype.zip (971.2 KB)
That being said, I tend to see quite a few other errors; for example immediately after the buttonShow timeline start code, you will get this error:
Error in undefined: TypeError: thumb.startTimelineNamed is not a function. (In 'thumb.startTimelineNamed("Main Timeline", hypeDocument.kDirectionForward)', 'thumb.startTimelineNamed' is undefined)