jQuery UI sortable: determining in what order the items are

后端 未结 5 930
深忆病人
深忆病人 2020-12-13 20:22

Here is an interesting use of JavaScript: reordering items with drag and drop. The implementation itself in my page works fine, but is there a way to determine in which orde

5条回答
  •  难免孤独
    2020-12-13 20:49

    Use toArray method which serializes the sortable's item id's into an array of string.

    $( "#sortable" ).sortable('toArray');
    

提交回复
热议问题