Free jQuery Plugins Clipboard.jsBy copying a text to the clipboard is not a hard process. It does not require many steps to copy the input texts to clipboard. It is in easy steps to configure or hundreds of kBs to load but the most of all it does not depend on any of the flash or any of the bloated framework. It covers the div area.
Table of Contents
How to use :
1. Add jQuery Library with clipboard.js link :
<script src="/jquery.min.js"></script>
<script src="dist/clipboard.min.js"></script>
2. Add To use the data-clipboard-text data attribute with use data-clipboard-target data attribute :
<div>Hello Copy 1</div>
<button class="btn" data-clipboard-action="copy" data-clipboard-target="div">Copy </button>
3. Finally, you’ll want to instantiate it with all elements with a class of clipboard:
$( document ).ready(function() {
var clipboard = new Clipboard('.clipboard');
});
Done
Thanks for make jQuery plugin is developed by For more Helpfull for users, please check the demo page or visit the official website.