Copy Code To Clipboard Plugin –Code Box Copy is a lightweight and flexible jQuery syntax plugin that provides an easy-to-use and simple way to copy any text to the clipboard with one click.
This jQuery plugin for the favored Prism syntax highlighter means that you can copy the content material inside the code field to the clipboard with a customizable copy button.
Parameters
tooltipText
string | Default value: ‘Copied’ – Text of the tooltip when the user clicks the copy button.tooltipShowTime
integer | Default value: 1000 – The time (in milliseconds) until the tooltip appears after the fade-in and before the fade-out.tooltipFadeInTime
integer | Default value: 300 – The fade in time (in milliseconds) until the tooltip appears.tooltipFadeOutTime
integer | Default value: 300 – The fade in time (in milliseconds) until the tooltip disappears,.
Must Read: Copy A Text String From An Input Element | angular-clipboard
How to make use of it:
1. Load the wanted jQuery library, Prism.js, and clipboard.js in your HTML document.
<link href="/path/to/prism.min.css" rel="stylesheet"> <script src="/path/to/jquery.min.js"></script> <script src="/path/to/prism.min.js"></script> <script src="/path/to/clipboard.min.js"></script>
2. Load the jQuery Code Box Copy files.
<link href="code-box-copy.css" rel="stylesheet"> <script src="code-box-copy.js"></script>
3. Create the content you need to copy – Copy to Clipboard jQuery.
<div class="code-box-copy"> <button class="code-box-copy__btn" data-clipboard-target="#example-html" title="Copy"></button> <pre><code class="language-html" id="example-html"><div class="example"> Lorem ipsum </div></code></pre> </div>
4. Initialize the plugin.
$('.code-box-copy').codeBoxCopy();
5. Default parameters.
$('.code-box-copy').codeBoxCopy({ tooltipText: 'Copied', tooltipShowTime: 1000, tooltipFadeInTime: 300, tooltipFadeOutTime: 300 });
See Demo And Download

Official Website(jablonczay): Click Here
This superior jQuery/javascript plugin is developed by jablonczay. For extra advanced usage, please go to the official website.