Sportsquid
Sportsquid

Reputation: 1

How to stop a javascript function after a certain amount of time?

I am making a html and javascript game. I have a title picture of my company but need to display of for only a few seconds how should I do this?

Upvotes: 0

Views: 1441

Answers (1)

Vond Ritz
Vond Ritz

Reputation: 2012

Here's the FIDDLE. Try setTimeout.

setTimeout(function () {
    alert("Hello");
    //your code here...
}, 3000);

Upvotes: 1

Related Questions