jQuery.sortable. change the order by JavaScript

后端 未结 3 1574
广开言路
广开言路 2020-12-31 12:41

How can I change the order of a list once applied by JavaScript jQuery.sortable.

For example:

3条回答
  •  没有蜡笔的小新
    2020-12-31 13:10

    As Sparr has said, there's no way to sort them using sortable directly, but you can still move them manually with something like:

    $("#mylist li:eq(1)").insertAfter($("#mylist li:eq(2)"));
    

提交回复
热议问题