I am trying to implement a simple related sort, whose display can be switched by the user.
$('#toggle').click(function(){ $('#content').toggle(); }); $('#target').sortable(); $('#source div').draggable({ connectToSortable: '#target', helper: 'clone' });
I have a problem. If the sorted (target) collapsed and the drag operation is performed, the sorting stops working.
See http://jsfiddle.net/9hGrs/12/
- Press the toggle button to hide the sort
- Drag any item from the source anywhere on the page and release it (i.e. this simulates an invalid drop).
- Press the switch button again to show sorting
- Now, when you try to drag an item from a source to a sortable one, it does not accept the dragged one.
Any idea what I'm doing wrong here? I would appreciate any help. Thanks!
source share