So i need a button to get disabled after its clicked and then after few seconds it should become enabled again. I added a class button-disabled since i want to use it couple of times on the same page. Here is what i tried
$(document).on('click', '.button-disabled', function (){
$(this).prop('disabled', true);
setTimeout(function() {
$(this).prop('disabled', false);
}, 3500);
});
<button type="button" id="buttonSettings" class="btn btn-success button-disabled">Sacuvaj</button>
I looked up similar questions on the site, but none of those help because everytime buttons does get disabled after click but it never gets enabled again. Any help would be appreciated.