MooClip 1.0
MooClip add a copy to clipboard functionnality to your website using ZeroClipboard and Mootools.
Details
- Author
- Yannick Croissant
- Current version
- 1.0
- GitHub
- yannickcr/MooClip
- Downloads
- 1136
- Category
- Utilities
- Tags
- Report
- GitHub Issues
How to use
To use MooClip, you need one or more elements to use as "copy" buttons and a source for the data to copy to clipboard (by default it will use the data-copy attribute (HTML5) of your button). Just call the constructor with the element(s) as first parameter and the options object as second parameter.
Example
HTML:
<button id="mycopybutton" data-copy="Text to copy">Copy to Clipboard</button>
JavaScript:
new MooClip('#mycopybutton', {
onCopy: function(e){
// do stuff
}
});
Discuss
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus