获取已删除元素的ID和新的父ID(jQuery UI + nestedSortable)

时间:2018-07-10 19:23:17

标签: jquery jquery-ui jquery-ui-sortable nested-sortable

我想要放置的对象的id和parent_id。

我尝试浏览nestedSortable的relocate事件提供的ui对象,但找不到与toArray方法提供的信息相同的信息。

toArray提供了这一点:

'0' ...
    'item_id' ...
    'parent_id' ...
    'depth' => "0"
    'left' => "1"
    'right' => "10"
'1' ...
    'editable' => ""
    'id' => "367"
    'parent_id' ...
    'depth' => "0"
    'left' => "2"
    'right' => "5"
'2' ...
    'nestedSortable.preventClickEvent' => "true"
    'editable' => ""
    'id' => "361"
    'parent_id' => "367"
    'depth' => "1"
    'left' => "3"
    'right' => "4"
'3' ...
    'editable' => ""
    'id' => "368"
    'parent_id' ...
    'depth' => "0"
    'left' => "6"
    'right' => "7"
'4' ...
    'editable' => ""
    'id' => "371"
    'parent_id' ...
    'depth' => "0"
    'left' => "8"
    'right' => "9"

我需要的只是被放置对象的属性:

'2' ...
    'nestedSortable.preventClickEvent' => "true"
    'editable' => ""
    'id' => "361"
    'parent_id' => "367"
    'depth' => "1"
    'left' => "3"
    'right' => "4"

0 个答案:

没有答案