https://github.com/ded/dagron
Ender interface to HTML5 drag and drop
https://github.com/ded/dagron
Last synced: about 1 year ago
JSON representation
Ender interface to HTML5 drag and drop
- Host: GitHub
- URL: https://github.com/ded/dagron
- Owner: ded
- Created: 2011-12-09T22:19:20.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2012-01-09T18:10:17.000Z (over 14 years ago)
- Last Synced: 2025-03-25T11:11:29.204Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 110 KB
- Stars: 47
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Ender interface to HTML5 Drag and Droppables
Works like this
``` js
$('div.draggables').dagron({
// all options are 'optional', no pun intended
handle: 'div.handle'
, target: 'div.droptarget'
, start: function (el) {
// el is the item you started dragging
}
, drag: function (el) {
// el is dragged element
}
, drop: function (el) {
// el is the target the dragged item was dropped on
}
, enter: function (el) {
// el is the element target you entered into
}
, leave: function (el) {
// el is the item left from
}
, end: function (el) {
// el is the element you stopped dragging
}
})
```
### Dependencies
Minimal dependency of [Enders](http://ender.no.de) [Jeesh](http://ender-js.s3.amazonaws.com/jeesh.min.js)