timeout reset button text after click

This commit is contained in:
simon 2022-11-25 19:14:52 +07:00
parent 6b6a9b8b02
commit 59709c4c29
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 6 additions and 0 deletions

View File

@ -318,8 +318,14 @@ function buttonSuccess(button) {
}
if (buttonSpan.innerHTML === "Subscribe") {
buttonSpan.innerHTML = "Success";
setTimeout(() => {
buttonSpan.innerHTML = "Subscribe";
}, 2000);
} else {
buttonSpan.innerHTML = checkmarkIcon;
setTimeout(() => {
buttonSpan.innerHTML = downloadIcon;
}, 2000);
}
}