Streamline Copy and Share Actions with The CopyShareify Plugin

File Size: 38.2 KB
Views Total: 321
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Streamline Copy and Share Actions with The CopyShareify Plugin

CopyShareify is a tiny yet useful jQuery plugin that adds customizable copy and share functionality to buttons on your website. With just a few lines of code, you can empower users to instantly copy and distribute your content.


  • Copy any content (text, images, input values) to the clipboard.
  • Share any content on the page using the Web Share API.
  • Define different copy and share actions per button.
  • Configure options via HTML data attributes.

How to use it:

1. To use the plugin, download and include the copyshareify.min.js script after jQuery library.

<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/dist/copyshareify.min.js"></script>

2. Initialize the plugin on document ready.


3. Enable a button to copy the text defined in the data-string attribute.

  data-string="Text To Copy">
  Click To Copy

4. Enable a button to copy the text in an HTML element.

<p id="copy">
  Text To Copy
  Click To Copy

5. Enable a button to copy an image within the document.

<img id="img" src="copy.png">
  Click To Copy

6. Enable a button to share any content using the Web Share API.

  data-description="A jQuery Website!" 
  Share Link

7. You can also integrate the Copy or Share functionality into buttons using JavaScript as follows:

  action: null, // 'copy', or 'share'
  string: null,
  htmlInputSelector: null,
  htmlElementSelector: null,
  htmlImgSelector: null,
  title: null,
  description: null,
  onActionDone : function () {},
  onActionFailed : function (error) {},



  • Bugfixes


  • Bugfix

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