정말 도움이 필요합니다. 나는이 권리를 얻기 위해 열심히 노력했지만 난 그냥 그것을 할 수 없습니다 ..jQuery (드래그 가능/드롭 가능 동작 포함)
이jsfiddle : http://jsfiddle.net/5Vyq8/13/이
JS 코드 :
$(document).ready(function() {
// Treetable
$("table").treetable({
expandable: true,
initialState: "expanded",
expanderTemplate: "<a href='#'> </a>",
indent: 24,
column: 0
});
// Draggable
$("table .draggable").draggable({
opacity: .75,
refreshPositions: true,
revert: "invalid",
revertDuration: 300,
scroll: true,
delay: 100,
cursor: 'move'
});
//Droppable
$("table tbody tr").each(function() {
$(this).droppable({
accept: ".draggable",
hoverClass: "append-to-task",
over: function (e, ui) {
// add class 'accept-incoming-task' to the row under after 1 second
},
out: function() {
},
drop: function (e, ui) {
var droppedEl = ui.draggable;
// Adds the task as the first child to dropped row
$("table").treetable("move", droppedEl.data("ttId"), $(this).data("ttId"));
},
});
});
});
내가 '무엇 달성을 위해 노력하고 있습니다 :
- 행을 다른 행으로 드래그하십시오. (완료!) 여전히 유혹하고 다른 행에 이동하는 것이 이전 단계에서 추가 된 클래스를 제거해야하는 경우가
- 아래 행에 클래스를 추가해야합니다 1 초 이상 공중 선회하면서
- 는
내가 시간을 appriciate 및 도움.
감사 의견에 대한 많은 여기에 솔루션입니다. 그러나 그것은 단지 내 끝에서 작동하지 않습니다. 예를 들어 글자 "H"를 드래그하여 위로 "D"로 옮길 때, 글자 "G"는 글자 "D"가 아닌 클래스 이름을 얻습니다. – karlingen