How to Add 16 Sec Download Timer Button in Blogger & WordPress [Full Guide 2023] | OPK COAD 016 COPY PAST


Install Widget

How to Add 15 Sec Download Timer Button in Blogger & WordPress [Full Guide 2023]


How to Add Download Button With Timer

As a result, I've included all of those steps below. 

  1. 1/ Download the HTML and JavaScript code for the Timer Button.
  <center>

<button type="button" onclick="myFunction()" id="countdown" style="background-color: DodgerBlue; font-family: verdana; font-size: 20px; color: white; padding: 12px 30px; ">Go To Download</button></center>

<div style="text-align: center;">

<a href="@@@" id="download_link" style="display: none;"><button style="background-color: DodgerBlue; border: none;  color: white; padding: 12px 30px; cursor: pointer; font-size: 20px;" >Downlaod Link</button></a>

<noscript>JavaScript needs to be enabled in order to be able to download.</noscript>

<script type="application/javascript">

function myFunction(){

   var message = "%d seconds before download link appears";

   // seconds before download link becomes visible

   var count = 16;

   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

          count--;

      } else {

          // stop timer

          clearInterval(timer);

          // hide countdown

          countdown_element.style.display = "none";

          // show download link

          download_link.style.display = "";

      }

   }, 1000);

}

</script>


  1. 2/ First and foremost, you will receive this Download Timer's Script. Make a copy of it.
  2. 3/ Now you must put this code wherever you want this widget to appear.
  3. 4/ Now, replace "@@@" with the download link in the code.
  4. 5/ And if you want to adjust the time, you can do it quickly. Also, keep it.
  5. 6/ Your task has now been completed successfully.

Conclusion

And how did you appreciate this post on how to add a download timer to Blogger and WordPress? As a result, you must inform us by leaving a comment in the box below. Also, I'd like to make a recommendation. As a result, you can express your thoughts in the comment section below.


Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.