draggable not working anymore after clone destroyed

draggable not working anymore after clone destroyed

Amateur question for sure but I can't figure it out: Every time I let go of the clone, I am unable from that point on to drag the original div anymore.

  1. $(document).ready(function() {
  2. $('#dragMe').draggable({
  3. containment: 'parent',
  4. cursor: 'move',
  5. //snap: 'true', 
  6. helper: 'clone',
  7. drag: dragEventHandler,
  8. stop: stopEventHandler,
  9. });
  10. function dragEventHandler(e,u) {}
  11. function stopEventHandler(event, ui) {
  12. var offsetX = parseInt(ui.offset.left);
  13. var offsetY = parseInt(ui.offset.top);
  14. alert("stopped at\n\n offset: " + offsetX + ", " + offsetY);
  15. }
  16. });