jquery draggable into sortable only works after sorting
- by Dao
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?