Click to copy to clipboard jQuery

click to copy

Click to copy to clipboard jQuery:




If you look at the coupon websites, they will copy the coupon you clicked to your clipboard.





Plugins Required for click to copy to clipboard:

1. jQuery Plugin [jquery.min.js]

2. zClip Plugin [jquery.zclip.js]


Click to Copy to clipboard jQuery source code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="" xml:lang="en" lang="en">
<title>Click To Copy |</title>
<script type="text/javascript"
<script type="text/javascript"
<style type="text/css">
#javadomain {
/*style for flat textbox with border black*/
/* border: 1px solid #000000; */
/*style for flat textbox with border white*/
border: 1px solid white;
font-size: 15px;
height: 30px;
width: 100px;
$(document).ready(function() {
path : "js/ZeroClipboard.swf",
copy : function() {
return $("input#javadomain").val();
<input type="text" id="javadomain" value="" />
<a href="#" id="copy-javadomain">Click to Copy</a>







Before Copying to clipboard, if you want prompt need to be asked, then you can check the below code,


jQuery Copying to clipboard with promt source code:

<script type="text/javascript" src="//"></script>
<script type="text/javascript">
function copyToClipboard(text) {
window.prompt("Press Ctrl+C to copy to clipboard", text);
$('#javadomain').click(function() {
<div id="javadomain">Welcome to</div>





click to copy prompt



Download Source Code:

jQuery Click To Copy – Prompt Source Code



jQuery Recommended Books:




1,506 total views, 1 views today

About Mirthbees 678 Articles
Blogger, Innovator, Developer and Enterpreneur. Founder of GuruRecharge, Readymade online recharge script. Lead Developer in

Be the first to comment

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.