jquery ui saving sortable list

Solutions on MaxInterview for jquery ui saving sortable list by the best coders in the world

showing results for - "jquery ui saving sortable list"
Madonna
03 Jan 2019
1
2        $("#list").sortable({
3
4            update : function () {
5
6                var neworder = new Array();
7
8                $('#list li').each(function() {    
9
10                    //get the id
11                    var id  = $(this).attr("id");
12                    //create an object
13                    var obj = {};
14                    //insert the id into the object
15                    obj[] = id;
16                    //push the object into the array
17                    neworder.push(obj);
18
19                });
20
21                $.post("pagewhereyouuselist.php",{'neworder': neworder},function(data){});
22
23            }
24        });
25