WmZilla - Webmaster and Marketplace

The Next Generation Webmaster and Trade Forum

Download counter for download button

LUCA

New member

0

0%

Status

Offline

Posts

40

Likes

0

Rep

0

Bits

210

5

Months of Service

0%
Hello everyone, this is the same code as before, but in this case I have changed the loading animation to make it look better. I hope you like it.

Improvement demonstration:

HTML:
<button data-link="Your-Link-Here" id="download-button" target="_blank">Download</button>
<div id="timer"></div>
<div class="loader"></div>

CSS:
#download-button {}
#timer {}
.loader {}

@media screen and (max-width: 768px) {
#timer {}
}

@keyframes spin {
100% {}
}

JavaScript:
const downloadBtn = document.getElementById('download-button');
const timer = document.getElementById('timer');
const loader = document.querySelector('.loader');

downloadBtn.addEventListener('click', function() {
seconds...`;

if (timeLeft == 0) {
else {}
}
}, 1000);
});

Important: Again, a reminder of the previous code. The code may not open in a popup window, but a link notification is triggered.

I hope you like it. ???
 

249

6,622

6,642

Top