mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
@ -30,12 +30,18 @@ If you're not into package management, just [download a ZIP](https://github.com/
|
|||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
First, include the script located on the `dist` folder
|
First, include the script located on the `dist` folder.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="dist/clipboard.min.js"></script>
|
<script src="dist/clipboard.min.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Or load it from a CDN.
|
||||||
|
|
||||||
|
```html
|
||||||
|
<script src="https://cdn.rawgit.com/zenorocha/clipboard.js/master/dist/clipboard.min.js"></script>
|
||||||
|
```
|
||||||
|
|
||||||
Now, you need to instantiate it using a DOM selector. This selector corresponds to the trigger element(s), for example `<button class="btn">`.
|
Now, you need to instantiate it using a DOM selector. This selector corresponds to the trigger element(s), for example `<button class="btn">`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
Reference in New Issue
Block a user