Search code examples
jqtree

How to save effect of drag on drop in jqtree


I am using drag and drop support of jqtree http://mbraak.github.io/jqTree/examples/drag_and_drop.html

but that effect is temporarily how to save changes ??


Solution

  • Got answer need to bind move event to jqtree http://mbraak.github.io/jqTree/#event-tree-move

    like this u can send all information to server

    $('#tree1').bind(
        'tree.move',
        function(event)
        {
            event.preventDefault();
            // do the move first, and _then_ POST back.
            event.move_info.do_move();
            $.post('your_url', {tree: $(this).tree('toJson')});
        }
    );