jquery draggable into sortable only works after sorting
Posted
by Dao
on Stack Overflow
See other posts from Stack Overflow
or by Dao
Published on 2010-04-03T12:58:13Z
Indexed on
2010/04/03
13:03 UTC
Read the original article
Hit count: 238
Hi,
I'm experiencing problems with a simple combination of a Draggable and Sortable: initially, the dragging does not work and I do not get a receive callback. Only after I have done a sort (i.e. change the position of things in #workarea), can I drag new things into it.
Somehow it seems as if the sortable needs to be 'initialized' before it accepts draggables. My code, in a simplified version:
$(".element_draggable").draggable({
zIndex: 2,
helper: 'clone',
connectToSortable: '#workarea'});
$("#workarea").sortable({
receive: function() {alert('received');}
});
Does anyone have an idea on what I could be doing wrong here?
© Stack Overflow or respective owner