1

Please refer to this jsFiddle example.

At the first time dragging the draggable, it jumps out of viewable area. Yet it is still draggable. It just doesn't stick to mouse cursor.

The following code is the main JS code I use.

$('.sortable').sortable({
    revert: true
});

$('.draggable').draggable({
    connectToSortable : '.sortable',
    revert            : 'invalid'
});
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Ian Y.
  • 2,293
  • 6
  • 39
  • 55
  • This is most likely because it's being set into the .sortable div where it all of a sudden gains it's css styles. simply moving the div into the .sortable div solves it in the fiddle, though i doubt that's what you're looking for. – Kevin B Jan 25 '13 at 15:34
  • Try to add ```tolerance: "pointer"``` parameter – Yukulélé Jan 25 '13 at 15:43
  • @Kevin B, could you explain how I could do "moving the div into the .sortable div"? – Ian Y. Jan 25 '13 at 15:50
  • @Yukulélé, I tried but the result is the same. – Ian Y. Jan 25 '13 at 15:51

0 Answers0