I want to disable a link for 10 seconds. If would do permanently I would use that approach when user click on it:
if ($('#report-download').hasClass("disabled")) {
e.preventDefault();
}
$('#report-download').addClass("disabled");
How could I revert that after 10 seconds?
setTimeout(function(){ revertPreventDefalt(){
// This is my question
}; }, 10000);
Note: the setTimeout is not the point. The point here is how to revert the preventDefault().