How To Add Timer Before Downloading File In Blogger Post ( New )

Copy Below Code And Paste To Which Post U Want Add Timer For Download File.

Here Some Changes U Need To Do Before Copy This Code 

1.If U Want Change Timer ( Seconds ) Change Number ''15''  ( var count = 25; )

2.Add Your Download Link  <a href="#" id="download_link" style="display: none;"><img src="

3.If U No Need Text ''Download Timer'' Just Remove Or Replace With Your Own Text As U Want.

4.Now Copy And Use This Code.

<div dir="ltr" style="text-align: left;" trbidi="on">
<span id="countdown">You have to wait 15 seconds.</span></center>
<br />
<div style="text-align: center;">
<b>Download Timer</b><br />
<a href="#" id="download_link" style="display: none;"><img src="" /></a>
<noscript>JavaScript needs to be enabled in order to be able to download.</noscript>
<script type="application/javascript">
   var message = "%d seconds before download link appears";
   // seconds before download link becomes visible
   var count = 15;
   var countdown_element = document.getElementById("countdown");
   var download_link = document.getElementById("download_link");
   var timer = setInterval(function(){
      // if countdown equals 0, the next condition will evaluate to false and the else-construct will be executed
      if (count) {
          // display text
          countdown_element.innerHTML = "You have to wait %d seconds.".replace("%d", count);
          // decrease counter
      } else {
          // stop timer
          // hide countdown
 = "none";
          // show download link
 = "";
   }, 1000);

You have to wait 15 seconds.

Post a Comment