Download
Demo
- Overview
- Documents
User Rating: 2.4/5 ( 2 votes)
Your Rating:
Dropper is a jQuery plugin for simple drag and drop uploads.
Source: formstone.it
1. INCLUDE JS AND CSS FILES
<script src="jquery.js"></script> <script src="jquery.fs.dropper.js"></script> <link href="jquery.fs.dropper.css" rel="stylesheet">
2. HTML
<div class="target"></div>
3. JAVASCRIPT
$(".target").dropper({ action: "upload.php" });
4. OPTIONS
Options are set by passing a valid options object at initialization or to the public "defaults" method. You can also set custom options for a specific instance by attaching a data-boxer-options attribute containing a properly formatted JSON object to the target element.
NAME | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
action | string | Where to submit uploads | |
label | string | 'Drag and drop files or click to select' | Dropzone text |
maxQueue | int | 2 | Number of files to simultaneously upload |
maxSize | int | 5242880 | Max file size allowed |
postData | object | Extra data to post with upload | |
postKey | string | 'file' | Key to upload file as |
5. EVENTS
Events are triggered on the target instance's element, unless otherwise stated.
OPTION | DESCRIPTION |
---|---|
start.dropper | |
complete.dropper | |
fileStart.dropper | |
fileProgress.dropper | |
fileComplete.dropper | |
fileError.dropper |
6. METHODS
Methods are publicly available to all active instances, unless otherwise stated.
defaults
Sets default plugin options
$.dropper("defaults", opts);
PARAMETER | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
opts | object | {} | Options object |