Trouble with ZeroClipboard

Posted by JorgeV44 on Stack Overflow See other posts from Stack Overflow or by JorgeV44
Published on 2010-05-13T09:18:53Z Indexed on 2010/05/13 9:24 UTC
Read the original article Hit count: 228

Filed under:
|

Hi, I'm trying to use Zeroclipboard to copy stuff to the clipboard, but it doesn't seem to be working. My code:

HTML:

<textarea name="texter" id="texter"></textarea>
<input type="button" value="Copy to clipboard" id="copy-button" />

Javascript:

<script type="text/javascript">
jQuery(document).ready(function(){

  var clip = new ZeroClipboard.Client();
  clip.setText('');  

   jQuery('#copy-button').click(function(){
  clip.setText(jQuery('#texter').val());
 }


});
</script>

What's wrong with this? Thansk!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about zeroclipboard