Copy Text To Clipboard Plugin - pcsCpClipboard.js

Copy Text To Clipboard Plugin - pcsCpClipboard.js
File Size: 4.92 KB
Views Total: 846
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Just another JavaScript plugin that allows to copy any text inside a specific container to the clipboard with just one click. Compatible with jQuery and Vanilla JavaScript.

Comparison:

Basic usage:

1. Download the insert the pcsCpClipboard.js JavaScript file into the webpage.

<script src="js/pcsCpClipboard.js"></script>

2. The JavaScript to copy text inside the container 'pcs-cp-container':

pcsCpClipboard('pcs-cp-container')

3. If you want to implement the pcsCpClipboard.js as a jQuery plugin.

<script src="//code.jquery.com/jquery.min.js"></script>
$('#pcs-cp-container').pcsCpClipboard({ // Set elemente ID to copy (ONLY ID)
  button: '#pcs-cc-button' // Set button for copy
});

This awesome jQuery plugin is developed by Pasquale-CS. For more Advanced Usages, please check the demo page or visit the official website.