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

  • Home
  • SEARCH
  • 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 3425688
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:37:27+00:00 2026-05-18T06:37:27+00:00

I will try to explain my problem with as little code as possible. Basically

  • 0

I will try to explain my problem with as little code as possible.

Basically I have several sortable lists connected in the usual way. Each item in the list has some hidden elements that are toggled with a button on the respective items. There is also a second button that causes the list item to slideUp and be removed from the list – then being sent to a new list. This works in conjunction with an ajax call which when successful uses the .load() function to refresh the receiving sortable list.

The problem: When I use .load() to refresh the receiving sortable list, the new list item is present but the list loses its sort-ability and all the hidden items on each list item are displayed. Any idea why the .load() function removes the interactivity of refreshed page elements?

This is the code to remove an item and refresh a new list:

$(document).ready(function click(){
$(".finished").click(function() {

  if (confirm('Are you sure  is complete?')) {

  $(this).closest(".card").slideUp();

  var id = $(this).closest(".card").find(".hiddenid").val();
  var machinequantity = $(this).closest(".card").find(".machinequantity").val();

  $.ajax({

       url: "update_item_machine_complete.php",
       type: "POST",
       data: "&id="+id+"&machinequantity="+machinequantity,        
       success: function() {
                           $('#complete').load('index.php #sortable4')         
                           }
     });

    }
  });
});

Here’s an example of the receiving list:

            <div id="complete" class="box">
    <ul id="sortable4" class="sortable">
    <li class="notsortable"><h1>Complete</h1></li>
<?php

include("php/database_connect.php");


$result = mysql_query("SELECT * FROM orders WHERE misc='complete' ORDER BY columnpos   ASC ");

while($row = mysql_fetch_array($result))

              {
         echo'  

        <li id="id_' . $row['id'] . '">
         <div class="card">
         <table>
         <tr>
         <td class="left">' . $row['customer'] . '</td>
         <td></td>
         <td class="right">' . $row['ponumber'] . '</td>
         </tr>
         <tr>
         <td class="left">' . $row['partnumber'] . '</td>
         <td><div class="show"></div></td>
         <td class="right">' . $row['quantity'] . ' x Black</td>
         </tr>
         </table>
         <div class="hide">
         <p>Quantity Done: <span><input class="machinequantity" type="text" value="' . $row['quantity'] . '" /><input type="submit" value="update" /></span></p>
         <p><input class="finished" type="submit" value="Finished" /></p>
         <input class="hiddenid" type="hidden" value="' . $row['id'] . '" />
         </div>
         </div>
         </li>

         ';
         }
?>






    </ul>
    </div>

EDIT: This is the .sortable() code I’m using to record column and position:

$(document).ready(function {
$("#sortable01, #sortable0, #sortable1, #sortable2, #sortable3, #sortable4").sortable({
connectWith : ".sortable",
items : "li:not(.notsortable)",
receive  : function(event, ui){ 

         var column = $(this).parent().attr('id');
         var index = ui.item.index() + 1;
         var id = $("#"+column+" li:nth-child("+index+") .hiddenid").val();


         $("#"+column+" li:nth-child("+index+") ").addClass('notsortable');

         $.ajax({

                 url: "update_column.php",
                 type:"POST",
                 data: "column="+column+
                       "&id="+id,
                 success: function(){


                           $("#"+column+" li:nth-child("+index+")   ").removeClass('notsortable');

                                      }        

                });

                },

beforeStop : function (event, ui) {



                 $.ajax({

                 url: "update_column_order.php",
                 type:"POST",
                 data: {
                            sort0:$('#sortable0').sortable('serialize'),
                        sort1:$('#sortable1').sortable('serialize'),
                        sort2:$('#sortable2').sortable('serialize'),
                        sort3:$('#sortable3').sortable('serialize')
                       }

                });



                            },







 })
.disableSelection();
  $(".hide").hide();
 });
  • 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-18T06:37:27+00:00Added an answer on May 18, 2026 at 6:37 am

    Reinitialize the sortable functionality on the ajax-replaced elements within load‘s callback:

    $('#complete').load('index.php #sortable4', function() {
        $('#sortable4').sortable(options);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be a little hard to explain, but I will try. I want
I am working on an algorithm that will try to pick out, given an
I'm fairly new to C# but I will try to make this quick! ;)
I'm try to develop a regex that will be used in a C# program..
I am about to try and automate a daily build, which will involve database
Will the code below work if the clock on the server is ahead of
Will I have to pay again? I have about 9 months left before renewal
Will limiting a query to one result record, improve performance in a large(ish) MySQL
Will IE6 negotiate a 256 bit AES SSL connection if the server is capable?
Will content requested over https still be cached by web browsers or do they

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.