I have a button with an "onclick" function that disables the button for 15 seconds. After that it will be automatically clickable, but in between 15 seconds of time period after a click, if I do refresh the page, it doesn't count the remaining seconds and the button is now clickable.
function up(){
$(document).ready(function () {
$("#upside").attr("disabled", true);
document.getElementById("downside").disabled = true;
setTimeout(function () {
$("#upside").removeAttr("disabled");
$("#downside").removeAttr("disabled");
window.location ='/Balnce_add';
},15000);
});
}
And here is my HTML button code:
<button id="upside" onclick="up()" type="submit" class="btn btn-success">Up</button>