@@ -24,7 +24,7 @@ $("#restart-button").click(function(){
2424 runTimer ( ) ;
2525
2626 }
27- bgAnimate = false ;
27+ $ ( "body" ) . css ( { "animation-name" : "" , "animation-duration" : "" , "animation-iteration-count" : "" } )
2828
2929} )
3030
@@ -38,7 +38,8 @@ function resetTimer(){
3838
3939 timerOn = false ;
4040 bgAnimate = false ;
41- $ ( "#stop-timer-button" ) . css ( "display" , "inherit" ) ;
41+ $ ( "body" ) . css ( { "animation-name" :"" , "animation-duration" :"" , "animation-iteration-count" :"" } )
42+ $ ( "#stop-timer-button" ) . css ( "display" , "" ) ;
4243 $ ( "#stop-timer-div" ) . css ( "display" , "none" ) ;
4344 $ ( "body" ) . css ( "background-color" , "black" ) ;
4445 // clearInterval(timer);
@@ -91,18 +92,20 @@ function runTimer(){
9192 timerOn = false ;
9293 bgAnimate = true ;
9394
94- var flashRed = setInterval ( function ( ) {
95-
96- if ( bgAnimate == false ) {
97- clearInterval ( flashRed ) ;
98- return ;
99- }
100-
101- $ ( "body" ) . animate ( { "background-color" : "rgb(235, 0, 0)" } , 400 )
102- . delay ( 400 )
103- . animate ( { "background-color" : "black" } , 400 ) ;
104-
105- } , 1600 ) ;
95+ // var flashRed = setInterval(function(){
96+ //
97+ // if (bgAnimate == false){
98+ // clearInterval(flashRed);
99+ // return;
100+ // }
101+ //
102+ // $("body").animate({"background-color": "rgb(235, 0, 0)"}, 400)
103+ // .delay(400)
104+ // .animate({"background-color": "black"}, 400);
105+ //
106+ // }, 1600);
107+
108+ $ ( "body" ) . css ( { "animation-name" :"doneFlash" , "animation-duration" :"1.6s" , "animation-iteration-count" :"infinite" } )
106109
107110 }
108111
0 commit comments