Is it possible to drag items off the tree?

24 views
Skip to first unread message

boteeka

unread,
Mar 2, 2009, 6:40:32 AM3/2/09
to jsTree
I want to create a trash can and be able to drag items off the tree
and drop them on the trash can and delete it from the tree in a
callback.

I set up a div to be droppable: $("#trashcan").droppable({drop:
function() { alert('dropped'); }}). But this does't work. I have set
the draggable: "all" and dragrules: "all" settings, too.

Is there a way to accomplish this?

vakata

unread,
Mar 4, 2009, 4:25:29 AM3/4/09
to jsTree
Currently there is no build in method to drag items off the tree.
You could create a node, that is named "Trash".
Or you could experiment further with jQuery UI. I will test too and
let you know.
Regards,
Ivan

boteeka

unread,
Mar 4, 2009, 5:20:35 AM3/4/09
to jsTree
Thanks for showing interest :)

I will look into the jQuery UI internals a little bit. Maybe I'll have
luck.

Anyways, please drop a comment here if you have any good ideas.

All the best.
Reply all
Reply to author
Forward
0 new messages