<button class="" download="" href="#" id="K_download" type="button">[mycred_link amount=1 target=""]View portfolio[/mycred_link]</button>
<label class="pop__close pop_btnclose"><svg style="height: 25px; width: 25px; fill: black;" viewBox="0 0 512 512" xmlns="https://www.w3.org/2000/svg"><path d="M278.6 256l68.2-68.2c6.2-6.2 6.2-16.4 0-22.6-6.2-6.2-16.4-6.2-22.6 0L256 233.4l-68.2-68.2c-6.2-6.2-16.4-6.2-22.6 0-3.1 3.1-4.7 7.2-4.7 11.3 0 4.1 1.6 8.2 4.7 11.3l68.2 68.2-68.2 68.2c-3.1 3.1-4.7 7.2-4.7 11.3 0 4.1 1.6 8.2 4.7 11.3 6.2 6.2 16.4 6.2 22.6 0l68.2-68.2 68.2 68.2c6.2 6.2 16.4 6.2 22.6 0 6.2-6.2 6.2-16.4 0-22.6L278.6 256z"></path></svg></label>
<h2 style="margin: 0px;">Wait for claim option</h2>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<script>
//<![CDATA[
const modal = document.querySelector("#Popup_Back");
const btn = document.querySelectorAll(".Popup_button");
const closeModal = document.getElementsByClassName("pop_btnclose")[0];
for (let i = 0; i < btn.length; i++) {
btn[i].addEventListener("click", function() {
modal.style.display = "block";
});
}
btn.onclick = function() {
modal.style.display = "block";
};
closeModal.onclick = function() {
modal.style.display = "none";
};
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
};
var downloadButton = document.getElementById("K_download");
var counter = 30;
var newElement = document.createElement("span");
newElement.innerHTML = "Please Wait 30 sec";
newElement.style.font = '16px';
var id;
downloadButton.parentNode.replaceChild(newElement, downloadButton);
function startDownload() {
this.style.display = 'none';
id = setInterval(function() {
counter--;
if (counter < 0) {
newElement.parentNode.replaceChild(downloadButton, newElement);
clearInterval(id);
} else {
newElement.innerHTML = "Please Wait" + " " + counter.toString() + " " + " sec.... ";
}
}, 1000);
};
var clickbtn = document.getElementById("Popup_button");
clickbtn.onclick = startDownload;
//]]>
</script>
Points aren’t adding . My code :