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 4038356
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:27:46+00:00 2026-05-20T12:27:46+00:00

I’m creating a feature in my software that allows users to edit multiple items

  • 0

I’m creating a feature in my software that allows users to edit multiple items at once. They can choose what items they want and each one is placed in a column. I’ve then created a drag and drop interface to copy data from each item.

Problem is, I have to load a sortable for each column. If they choose 10 columns, it loads a heck of a lot of sortables which is causing the browser to hang and bring up a message in FireFox asking if I want to stop the script from running. This is obviously because browsers have a limited javascript execution time.

Is there a way I can make jQuery sortables load without causing the browser to hang?

Not sure if it’ll help but my code…

<script type="text/javascript">
$(document).ready(function() {

    $(".servicesMultipleMembers").sortable({
        connectWith: '.servicesMultipleMembers',
        placeholder: 'servicePlaceHolder',
        containment: '#servicesMembers',
        helper: 'clone',
        start: function(event, ui) {
            moving_li_index_members = $(this).find('li:hidden').index();
            $(this).find('li:hidden').show();
        },
        remove: function(event, ui) {
            var newRow = $(ui.item).html();
            var newRowRel = $(ui.item).attr('memberId');
            var newRowTarget = $(event.target).find('li:eq(' + (moving_li_index_members) + ')');
            if ($(newRowTarget).length == 0) {
                $(event.target).append('<li memberId="' + newRowRel + '">' + newRow + '</li>');
            } else {
                newRowTarget.before('<li memberId="' + newRowRel + '">' + newRow + '</li>');
            }
        },
        receive: function(event, ui) {
                        var newRowImg = $(ui.item).find('span.serviceTitle img').attr('src');
            var newRow = $(ui.item).html();
            newRow = newRow.replace(newRowImg, site_url + 'img/help.png');
            newRow = newRow.replace('<span class="member_declined">', '<span class="">');
            $(ui.item).html(newRow);
            MultipleServices.checkServicesMembersConflicts($(ui.item));
            update_member_stop = true;
        },
        update: function(event, ui) { // Only update if reordering list
            if (!update_member_stop && $(event.target).attr('id') == $(ui.item).parent().attr('id'))
                MultipleServices.updateServiceMembers($(ui.item).parent());
            update_member_stop = false;
        }
    });

});
</script>
  • 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-05-20T12:27:47+00:00Added an answer on May 20, 2026 at 12:27 pm

    i would try doing something with setTimeout and a recursive function. maybe something like this:

    function initSortable(idx) {
        if ($(".servicesMultipleMembers").eq(idx).length >0) {
            $(".servicesMultipleMembers").eq(idx).sortable({
                connectWith: '.servicesMultipleMembers',
                placeholder: 'servicePlaceHolder',
                containment: '#servicesMembers',
                helper: 'clone',
                start: function(event, ui) {
                    moving_li_index_members = $(this).find('li:hidden').index();
                    $(this).find('li:hidden').show();
                },
                remove: function(event, ui) {
                    var newRow = $(ui.item).html();
                    var newRowRel = $(ui.item).attr('memberId');
                    var newRowTarget = $(event.target).find('li:eq(' + (moving_li_index_members) + ')');
                    if ($(newRowTarget).length == 0) {
                        $(event.target).append('<li memberId="' + newRowRel + '">' + newRow + '</li>');
                    } else {
                        newRowTarget.before('<li memberId="' + newRowRel + '">' + newRow + '</li>');
                    }
                },
                receive: function(event, ui) {
                                var newRowImg = $(ui.item).find('span.serviceTitle img').attr('src');
                    var newRow = $(ui.item).html();
                    newRow = newRow.replace(newRowImg, site_url + 'img/help.png');
                    newRow = newRow.replace('<span class="member_declined">', '<span class="">');
                    $(ui.item).html(newRow);
                    MultipleServices.checkServicesMembersConflicts($(ui.item));
                    update_member_stop = true;
                },
                update: function(event, ui) { // Only update if reordering list
                    if (!update_member_stop && $(event.target).attr('id') == $(ui.item).parent().attr('id'))
                        MultipleServices.updateServiceMembers($(ui.item).parent());
                    update_member_stop = false;
                }
            });
            setTimeout(initSortable(idx+1),500);
        } else {
          //remove loading message logic goes here
        }
    }
    

    and then in the document .ready event: initSortable(0);

    the set timeout should give the browser some breathing room, though you will probably want some indication of work in progress on the page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and

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.