Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manufosela/draganddroplist
Vanilla Javascript class to do Drag And Drop List
https://github.com/manufosela/draganddroplist
Last synced: about 1 month ago
JSON representation
Vanilla Javascript class to do Drag And Drop List
- Host: GitHub
- URL: https://github.com/manufosela/draganddroplist
- Owner: manufosela
- Created: 2020-11-29T17:46:38.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-29T19:10:55.000Z (about 4 years ago)
- Last Synced: 2023-12-07T18:01:11.922Z (about 1 year ago)
- Language: JavaScript
- Size: 63.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DragAndDropList javascript class
To make UL/LI HTML list dragAndDroped easily. It uses vanilla javascript.
# Install
```
$ npm install drag-and-drop-list
```# Demo
[Codepen Demo](https://codepen.io/manufosela/pen/gOwbjBO);# Local demo
```
$ npm run start
```# Example
```javascript
import { DragAndDropList } from '../DragAndDropList.js';
const dndList = new DragAndDropList();
DragAndDropList.init();
```# Contructor Parameters
const dndList = new DragAndDropList(first, second);
* first: ['replace'] || 'before' -> drag and drop mode
* second: callbackFunction -> callback function to run when drag and drop finish