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. ???
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. ???