Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/io-developer/js-dragndrop
Vanilla javascript drag-n-drop for any binded element
https://github.com/io-developer/js-dragndrop
dom drag-and-drop element javascript native
Last synced: 3 days ago
JSON representation
Vanilla javascript drag-n-drop for any binded element
- Host: GitHub
- URL: https://github.com/io-developer/js-dragndrop
- Owner: io-developer
- License: mit
- Created: 2014-08-04T08:29:20.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-11-15T10:34:22.000Z (about 7 years ago)
- Last Synced: 2024-10-17T16:09:04.266Z (4 months ago)
- Topics: dom, drag-and-drop, element, javascript, native
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dragndrop
Pure JS drag-n-drop for any binded DOM element.
You can mixin behavior with lib __js-resizable__## Example
```html
dragndrop.initOnDocumentReady();
.js-dragndrop {
-moz-user-select: none;
-o-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
.outer {
display: block;
position: relative;
width: 640px;
height: 480px;
margin: 20px;
background-color: #EEE;
}
.inner {
display: block;
position: absolute;
min-width: 100px;
min-height: 50px;
padding: 20px;
}
.inner--1 {
left: 100px;
top: 100px;
width: 300px;
height: 200px;
background-color: #b1b1ff;
}
.inner--2 {
left: 100px;
top: 50px;
background-color: #92f192;
}
.inner--3 {
left: 400px;
top: 200px;
background-color: #ec7777;
}
Content A
sub div
Sub-content A
Content B
```