How can I make a 10 second countdown timer before a download button link appears?

Omar picture Omar · May 27, 2011 · Viewed 70.8k times · Source

On a download page, I would like to have it so that when the page loads, a 10 second timer automatically starts. On the page, I would like some text to say something like "You can begin your download in 10 seconds..." Then, after the time is up a download button appears for people to click on and start their download.

How can I do this, and what code do I use to include it into a page?

Answer

Ry- picture Ry- · May 27, 2011

See: http://jsfiddle.net/rATW7/

It's backwards-compatible and not so secure, but 10 seconds isn't much to worry about anyways.