I have the following jQuery loop but inside each loop-action I have user interaction and the code should wait till the user interaction should be finished. Is there a possibility to pause the loop or is it somehow other possible to realize it?
jQuery.each([345, 897, 345 /* ... */], function(index, value) {
// User interaction, need to wait the user finishing/answer
// Here is a jQuery UI dialog with an input field in it
// After the user entered their value and hit the submit button
// which fires an own callback which could also continue the loop somehow?
});
You will need to abandon
eachand handle this yourself. One option would be something like this: