jquery - Display my score when countdown has ended -


This is probably a very newbie question, but I have a timer game that slowly goes down, When it goes down I am displaying scores on a game over page.

As the score is linked to the timer, this score keeps displaying to each other. How do I stop it?

  var doUpdate = function () {$ ('countdown'). Each (function () {var count = parseInt ($ (this) .html ();) (count! == 0) {$ (this) .html (calculation - 1);} and {$ ('.overoverover h4 ') .Jodi ("You scocked" + score + "!!!") $ (' Gameover '). Show ();}}); }; // Schedule update for every once-set interval (doUpdate, 1000);   

Is there a way to create a listener who checks the count, so I do not have the append function in set interval, or possibly delete the second function in the SettterWill timer

Thanks

< P> You need clear interval to do this.
  var timeoutev; Var doUpdate = function () {$ ('countdown'). Each (function () {var count = parseInt ($ (this) .html ()); if (count! == 0) {$ (this) HTML (count - 1);} {{(Gameover H4 ') .Andand ("You scocked" + "+" + !!! "); $ (' Gameover '). Show (); Clear Interval (timeoutwise);}}); }; // Schedule of updates once every other timeout ev = setInterval (doUpdate, 1000);    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -