An open API service indexing awesome lists of open source software.

https://github.com/tpkn/dnd

Yet another wrapper for "drag and drop" action, one of the millions of similar
https://github.com/tpkn/dnd

Last synced: 3 months ago
JSON representation

Yet another wrapper for "drag and drop" action, one of the millions of similar

Awesome Lists containing this project

README

        

# DnD

Yet another wrapper for "drag and drop" action, one of the millions of similar. Just pass by...

## API
```javascript
new DnD(target[, options]);
```

### target
**Type**: _Object_
DOM element

### options.drop
**Type**: _Function_

### options.over
**Type**: _Function_

### options.out
**Type**: _Function_

## Usage
```javascript
var dnd = new DnD(document.getElementById('drop'), { drop: onDropHandler });

function onDropHandler(e, files, text){
console.log('files:', files);
console.log('text:', text);
}
```