 
     handleMouseUp: (e) =>
       # Stop listening for mousemove events
-      @$document.off
+      $(document).off
         mousemove: @handleMouseMove
 
       # Remove the dragging class

      # jQuery version of DOM element attached to the plugin
      @$element = $ element

      # jQuery version of the document element
      @$document = $ document

      # Storage for the start position of the draggable upon mousedown
      @elementStartPosition = {}
      @elementStartOffset = {}

      @mousedownEvent = e

      # Start to listen for mousemove events
      $(document).on
        mousemove: @handleMouseMove

      # Capture the mouse event
