Skip to content

Commit b07801d

Browse files
committed
Update readme.md
1 parent 63f2def commit b07801d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

readme.md

+6
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ or at the [source](https://github.com/enyo/dropzone/blob/master/src/dropzone.cof
8181
I use [emitter](https://github.com/component/emitter) to manage events. If you want to register to some event you can do so on the `dropzone` object itself:
8282

8383
```js
84+
Dropzone.options.myDropzone({
85+
init: function() {
86+
this.on("error", function(file, message) { alert(message); });
87+
}
88+
});
89+
// or if you need to access a Dropzone somewhere else:
8490
var myDropzone = Dropzone.forElement("div#my-dropzone");
8591
myDropzone.on("error", function(file, message) { alert(message); });
8692
```

0 commit comments

Comments
 (0)