diff --git a/README.md b/README.md index 02367c7..9309d30 100644 --- a/README.md +++ b/README.md @@ -20,24 +20,24 @@ First, you need to instantiate it using a selector. This selector corresponds to new Clipboard('.btn'); ``` -The easiest way to copy some content to the clipboard, is to include a `value` attribute in your trigger element. +The easiest way to copy some content to the clipboard, is to include a `data-value` attribute in your trigger element. ```html - + ``` -Another way of doing it, is to copy the content from an another element. You can do that by adding a `for` attribute in your trigger element. The value you include on this attribute needs to match another's element `id` attribute. +Another way of doing it, is to copy the content from an another element. You can do that by adding a `data-target` attribute in your trigger element. The value you include on this attribute needs to match another's element `id` attribute. ```html -
Lorem ipsum
- +Lorem ipsum
+ ``` -Additionally, you can define a `type` attribute to specify if you want to either `copy` or `cut` content. If you omit this attribute, `copy` will be used. +Additionally, you can define a `data-action` attribute to specify if you want to either `copy` or `cut` content. If you omit this attribute, `copy` will be used. ```html - - + + ``` As you may expect, the `cut` action only works on `` or `