0.1.0 • Published 8 years ago

dragOnZone v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

jQuery DragOnZone Build Status Bower Version

Detect drag & drop events outside the Drop Zone.

Usage

  1. Include jQuery:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
  2. Include plugin's code:

    <script src="your/path/to/dist/jquery.dragonzone.min.js"></script>
  3. Call the plugin:

    $("#dropZone").dragOnZone(options);

Demo

Options

NameTypeDefaultDescription
outZoneboolean, Dom element, jQuery selector, or jQuery elementfalseBy default, outZone is not used. In case you don't define outZone, the functions onDragOutsideStart and onDragOutsideEnd are never fired.
contextObject{}You could define the context (e.g. "context: this") inside functions onDragOutsideStart, onDragOutsideEnd, onDragInsideStart, onDragInsideEnd and onDropDone.
debugbooleanfalseShow or hide console logs.
onDragOutsideStartfunctionvoid functionCustom function fired when the mouse starts dragging a file over the element outZone
onDragOutsideEndfunctionvoid functionCustom function fired when the mouse ends dragging a file over the element outZone
onDragInsideStartfunctionvoid functionCustom function fired when the mouse starts dragging a file over the element dropZone
onDragInsideEndfunctionvoid functionCustom function fired when the mouse ends dragging a file over the element dropZone
onDropDonefunctionvoid functionThis function is executed after dropping the file inside the Drop Zone.