Trying to get zclip to work:
jQuery(document).ready(function($){
$('.copy').zclip({
path:'http://www.steamdev.com/zclip/js/ZeroClipboard.swf',
copy:function(){return $('.macro').val();}
});
// The link with ID "copy-dynamic" will copy the current value
// of a dynamically changing input with the ID "dynamic"
});
now I get this error:
Uncaught TypeError: Object [object HTMLAnchorElement] has no method 'data' @ jquery.zclip.js line 286
$(this.domElement).data('zclipId', 'zclip-' + this.movieId);
Try this jsfiddle
Add jQuery and zClip to your document.
attach zClip to the element which will become your "copy button".
HTML Markup