Coupon Copy-to-Clipboard

</ head>

</ body>

<!-- COUPON COPY TO CLIPBOARD --> 
<script type="text/javascript" src="https://milankyncl.github.io/jquery-copy-to-clipboard/jquery.copy-to-clipboard.js">

<script>
//Change SAVE20NOW to whatever coupon or text you want to be copied
$('input#coup-field').val('SAVE20NOW');
$("input#coup-field").prop('readOnly', true);
$('input#coup-field').css( 'cursor', 'text' );

$(document).ready(function() {
  $('#copy-btn').CopyToClipboard();
  $('.copy-btn').click(function(){
  	//The values "Copied!" and #9ccd65 below are what the button will change to for 2 seconds
    $('.copy-btn').html('Copied!');
    $('.copy-btn').css('background-color', '#9ccd65');
    //The values "Copy" and #ec4609 below are what it will change back to
    setTimeout(function() { 
      $('.copy-btn').html('Copy')
      $('.copy-btn').css('background-color', '#ec4609')
    }, 2000);
  });
});
</script>

HTML/Embed

Author
Milan Kyncl
Published
Jun 12, 2020

How to use:

Tutorial Coming Soon!

Check Browser Support

Interactive Table

Comments

Unfortunately at this time we don't have SSO for comments so you will have to sign up separately to leave your comment. Thanks for understanding!

This simple yet awesome jquery plugin will allow us to copy a coupon code (or any content you want) to our clipboard to use later somewhere else.

Clone Project
Documentation
Author:
Built by
Built with
For the best experience

Please switch to desktop to view the content.

Back Home
Thank you! Your submission has been received!
Close Form
Oops! Something went wrong while submitting the form.
Become a Contributor