Answers for "save sort order of jquery sortable"

1

jQuery UI Sortable, then write order into a database

$('#element').sortable({
    axis: 'y',
    update: function (event, ui) {
        var data = $(this).sortable('serialize');

        // POST to server using $.post or $.ajax
        $.ajax({
            data: data,
            type: 'POST',
            url: '/your/url/here'
        });
    }
});
Posted by: Guest on May-20-2020
0

save sort order of jquery sortable

$('#element').sortable({
    axis: 'y',
    update: function (event, ui) {
        var data = $(this).sortable('serialize');

        // POST to server using $.post or $.ajax
        $.ajax({
            data: data,
            type: 'POST',
            url: '/your/url/here'
        });
    }
});
Posted by: Guest on January-09-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language