jQuery Plugin To Add Reference And Copyright Text To Copied Content

File Size: 6.1 KB
Views Total: 1351
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Plugin To Add Reference And Copyright Text To Copied Content

Copyright is a jQuery plugin to append a reference link or copyright text to user copied content on your web page.

How to use it:

1. Include jQuery library and the jQuery copyright plugin in the web page.

<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="jquery.copyright.js"></script>

2. Call the plugin on the document or any specific selector.

$(SELECTOR).copyright({
  // OPTIONS
});

3. Available options.

$(SELECTOR).copyright({

  // The text that will be added when copying
  text: "<br>Original: " + window.location.href, 

  // The minimum length of the copied text when running the plugin
  minlength: 0, 

  // Function to process the copied text
  processing: undefined

});

4. The remove method to stop the plugin.

$(SELECTOR).copyright('remove');

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