I'm making a simulator of the Smoke and Carbon Monoxide Alarm Nest Protect, by Nest. But when I press the button (click) the inner ring doesn't turn blue as it's supposed to. It speaks, as I used ResponsiveVoice, but it just doesn't light up! Here's my (unfinished) code.
<script src="http://code.responsivevoice.org/responsivevoice.js"></script>
<script>
function delay(millis) {
var date = new Date();
var curDate = null;
do { curDate = new Date(); }
while(curDate-date < millis);
}
function press() {
document.getElementById("unit").src = "assets/img/blue.jpg";
delay(500);
responsiveVoice.speak("Ready. In the Living Room. Press to test.");
delay(500);
document.getElementById("unit").src = "assets/img/idle.jpg";
}
</script>