How to add Download with Timer Button
Timer Download Script For Website
Here, in this post Hindimart have shared a script code for download button using timer. If you follow all the given steps, you can make a timer downloading button using a single html script.
Download Timer Button Script installation process
#STEP 1 Go to blogger dashboard, login with your google account. and click on post or page in which you want to apply this timer downloading script.
#STEP 2 Click on HTML view and copy below script and paste inside post.
#STEP 3 Remember the place where you want to add timer downloading button.
<div dir="ltr" style="text-align: left;" trbidi="on">
<center>
<span id="countdown">You have to wait 15 seconds.</span></center>
<br />
<div style="text-align: center;">
<b>Generating Download Link...</b><br />
<a href="https://www.hindimart.in/" target="_blank" id="download_link" style="display: none;">Download Now</a>
<noscript>JavaScript needs to be enabled in order to be able to download.</noscript>
<script type="application/javascript">
(function(){
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
count--;
} else {
// stop timer
clearInterval(timer);
// hide countdown
countdown_element.style.display = "none";
// show download link
download_link.style.display = "";
}
}, 1000);
})();
</script></div></div>
Replace https://www.hindimart.in/ with Url which you want to be open after time up. If you do follow the all steps you will not get any error in timer button to download.
Share to other apps
Copy
Post Link
infogerm.blogspot.com
ReplyDelete