I have some each iteration by data response from some jquery post action. My question is how to check that this itaration ends?
$.each(data, function(key, value){
//
}).promise().done(function(){
setTimeout(function(){
submitBtn.removeClass('buttonInProgress');
}, time);
});
This is my code, what is wrong? I have an error undefined is not a function
.