Closed dimaninc closed 11 years ago
Hello Dimaninc,
The following code worked for me. I make each li element droppable in the onCreateLi callback.
$('#tree1').tree({
autoOpen: true,
onCreateLi: function(node, $li) {
$li.droppable({
drop: function(e) {
console.log('drop', e);
},
activate: function(e) {
console.log('activate');
}
});
}
});
Cheers, Marco
shame on me!.. thanks!
If you have much elements, this is not a good solution because, you are declaring as much droppables as you got <LI>
elements.
The best choice, I think, is declaring the top element <UL>
as droppable and use the option tolerance: "pointer"
from jQuery droppable.
hello buddy, sorry its me again
i'm trying to connect jqtree and jqueryUI.droppable (i need to drop photo thumbnails to tree-view categories which are made with jqtree)
i've wasted the whole day but achieved no result - none of parts of tree-element (.jqtree-element, .jqtree_common, .jqtree-title) are able to recieve dropped objects
but when i create some static div below the tree and make it droppable - it works perfect!
could you please help me - what am i doing wrong? may be jqtree denies the all drap-and-drop actions to the tree except inner drag-and-drop?
thanks in advance!