MCPcopy Create free account
hub / github.com/codemistic/Web-Development / highlight

Function highlight

Simon Game/index.js:8–17  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

6var level = 0;
7
8function highlight(i){
9 setTimeout(()=>{
10 $("#"+seq[i]).addClass("animate");
11 $("#"+seq[i]).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100).delay(100); //for flash effect
12 PlayAudio(seq[i]);
13 },(i)*1000+100);
14 setTimeout(()=>{
15 $("#"+seq[i]).removeClass("animate")
16 },(i+1)*1000);
17}
18
19function PlayAudio(evt){
20 var audio = new Audio("sounds/"+evt+".mp3");

Callers 1

LetsPlayFunction · 0.85

Calls 2

PlayAudioFunction · 0.85
$Function · 0.50

Tested by

no test coverage detected