Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

JQuery UI Saving Sortable List


        $("#list").sortable({

            update : function () {

                var neworder = new Array();

                $('#list li').each(function() {    

                    //get the id
                    var id  = $(this).attr("id");
                    //create an object
                    var obj = {};
                    //insert the id into the object
                    obj[] = id;
                    //push the object into the array
                    neworder.push(obj);

                });

                $.post("pagewhereyouuselist.php",{'neworder': neworder},function(data){});

            }
        });
 
Comment

PREVIOUS NEXT
Code Example
Javascript :: jest simulate toggle switch rn 
Javascript :: js set value in object only if defined 
Javascript :: node mongodb $or 
Javascript :: react testing library increase debug length 
Javascript :: res.write image url 
Javascript :: Axios with React Hooks, “traditional” Promise syntax 
Javascript :: get input string js 
Javascript :: vuejs input call the value 
Javascript :: Select First Element querySelector 
Javascript :: nodejs convert buffer to uint8array 
Javascript :: image loading in Compose display image 
Javascript :: react native stack transition from right to left 
Javascript :: array con doble javascript 
Javascript :: inline if statement javascript 
Javascript :: geojson featurecollection 
Javascript :: agrgar atributo con id jquey 
Javascript :: split the string on any and all periods, question mark using regex 
Javascript :: inertia-link vuetify 
Javascript :: string.length 
Javascript :: jquery deparam 
Javascript :: nuxt history back 
Javascript :: Datatable shows No data available in table in angular 
Javascript :: input as html in console 
Javascript :: heroku proxy cross origin 
Javascript :: how to set image width and height dynamically in javascript 
Javascript :: vue router "savedposition" with ajax call 
Javascript :: yup test string async 
Javascript :: vue js qr code scanner 
Javascript :: redux actions 
Javascript :: how to add elements into an array in javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =