Skip to content

Commit

Permalink
remove overspecified selectors in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed Apr 12, 2024
1 parent f45c73f commit 31e9a2b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,20 @@ $ npm install --save @deltablot/dropzone
$ yarn add @deltablot/dropzone
```

First argument is an element to bind to, second argument is the [`options`](./src/options.js) object.

Use as **ES6 module** (recommended):

```js
import { Dropzone } from "dropzone";
const dropzone = new Dropzone("div#myId", { url: "/file/post" });
const dropzone = new Dropzone("#elementId", { url: "/file/post" });
```

or use as **CommonJS module**:

```js
const { Dropzone } = require("dropzone");
const dropzone = new Dropzone("div#myId", { url: "/file/post" });
const dropzone = new Dropzone("#elementId", { url: "/file/post" });
```

[👉 Checkout our example implementations for different
Expand All @@ -65,7 +67,7 @@ Use the standalone files like this:

<script>
// Dropzone has been added as a global variable.
const dropzone = new Dropzone("div.my-dropzone", { url: "/file/post" });
const dropzone = new Dropzone(".my-dropzone", { url: "/file/post" });
</script>
```

Expand Down

0 comments on commit 31e9a2b

Please sign in to comment.