Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7872857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:20:17+00:00 2026-06-03T02:20:17+00:00

I have the following jQuery loop but inside each loop-action I have user interaction

  • 0

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?
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:20:19+00:00Added an answer on June 3, 2026 at 2:20 am

    You will need to abandon each and handle this yourself. One option would be something like this:

    var curIndex = 0;
    var ids = [345, 897, 345 /* ... */];
    
    function doNext(){
    
      // check curIndex here to make sure you haven't completed the list, etc.
    
      var id = ids[curIndex++];
    
      // do stuff with this id
    }
    
    // THIS IS SOME SORT OF CODE EXECUTED WHEN THE "USER INTERACTION" FINISHES
    function interactionDone(){
       doNext();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following jQuery .each loop : $('.table-data tbody tr td').each( function(index) { $('.table-data
I have the following jquery code: jQuery(function(){ jQuery(select#rooms).change(function(){ var options = ''; jQuery.getJSON(/admin/selection.php,{id: jQuery(this).val(),
I have the following jQuery code which runs when I'm clicking an option in
I have the following JQuery statement and it is adding the class 'current' but
I have the following JSON and Jquery Code: JSON { employees:[ { name: Sandy
I have the following snippet of code that loops through the jQuery animate function
I'd like some help with the following jQuery code if possible... $(document).ready(function() { $('table.sortable').each(function()
I have the following jQuery code, which works fine: $(document).ready(function () { $('#link1').click(function ()
I have a JQuery's .each loop that calls a function with a parameter per
I have the following jQuery code in my PHP file (edited Jan 19 2010

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.