Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ $("#drop-area-div").dmUploader(options);
This way you can initialize the plugin. As parameter you can set all variables you want and the same goes for callbacks;
down bellow you can see a list of what [options](#options) and [callbacks](#callbacks) are availabe.

````javascript
$("#drop-area-div").data('dmUploader').({ galleryID: 1 });
````

This way you can set extraData AFTER dmUploader has initialized. Its useful for dropdowns.

##Markup
This is the simple html markup. The file input is optional but it provides an alternative way to select files for the user(check the online demo to se how to hide/style it)
````html
Expand Down
7 changes: 7 additions & 0 deletions src/dmuploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,13 @@
});
}

DmUploader.prototype.setExtraData = function(options)
{
if( typeof options === 'undefined' ) return;

this.settings.extraData = options;
}

$.fn.dmUploader = function(options){
return this.each(function(){
if(!$.data(this, pluginName)){
Expand Down