how to add countdown download button for wordpress

Mrsam_1

Well-known member
Administrative
Trusted Seller
Dec 1, 2018
25,682
28,546
120
You can try with a js download timer like this:
Code:
var downloadButton = document.getElementById("download");
var counter = 10;
var newElement = document.createElement("p");
newElement.innerHTML = "You can download the file in 10 seconds.";
var id;
downloadButton.parentNode.replaceChild(newElement, downloadButton);
id = setInterval(function() {
counter--;
if(counter < 0) {
    newElement.parentNode.replaceChild(downloadButton, newElement);
    clearInterval(id);
} else {
    newElement.innerHTML = "You can download the file in " + counter.toString() + " seconds.";
}}, 1000);

Do a Google search for "countdown download button for wordpress" and you will find what you're looking for.
 
  • Like
Reactions: sahilx16

Mrsam_1

Well-known member
Administrative
Trusted Seller
Dec 1, 2018
25,682
28,546
120
See that your theme academy pro v1.0.6 have a coding issue. jQuery is not defined:
Code:
jQuery(document).ready(function(){jQuery
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu