betaman/tree-drag-drop

It does not work correctly on the up to date version of jQuery

Opened this issue · 1 comments

Hi.
it is a good script and does exactly what i need
But my web framework uses jQuery v2.1.1 (jQuery UI Core 1.10.3) and this script works funny with it. (The item disappears after dropping )

Well if someone encounters this problem here is a solution:

  1. change marker.detach(); to marker.hide(); all over a script
  2. add one line:
handleDroppableOver: function (e, o) {
            debug("handleDroppableOver");
            var options = getOptions($(e.target)),
                selectedClass = options.selectedClass,
                beforeClass = options.beforeClass,
                afterClass = options.afterClass,
                marker = options.marker;
                marker.show(); // !!!!!!!!!!!!!!!!!!!! add this line