Skip to content

Instantly share code, notes, and snippets.

@eralston
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eralston/1df51f857bf74c34f923 to your computer and use it in GitHub Desktop.
Save eralston/1df51f857bf74c34f923 to your computer and use it in GitHub Desktop.
A code snippet for adding ZeroClipboard (https://github.com/zeroclipboard/zeroclipboard/) to an HTML page from CDN.js
<script src="https://cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.2.0/ZeroClipboard.min.js"></script>
<script>
$(function () {
ZeroClipboard.config({ swfPath: "https://cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.2.0/ZeroClipboard.swf" });
client = new ZeroClipboard($(".copy-button"));
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment