jQuery UI: sortable('toArray') returns an empty array

后端 未结 7 652
青春惊慌失措
青春惊慌失措 2021-02-01 17:28

This has me stumped. The follow code returns \",,,,,,\":



        
7条回答
  •  抹茶落季
    2021-02-01 17:51

    $('.sortable').sortable('toArray'); will only parse the first element of the class sortable. You can parse all elements by using each:

    $('.sortable').each(function(){
        result.push($(this).sortable('toArray'));
    })
    

提交回复
热议问题