$(function(){
$(' #copy_input').zclip({
path: 'js/ZeroClipboard.swf',
copy: function(){//Copy content
return $('#mytext').val();
afterCopy: function(){//Copy successfully ('Copied successfully');
}
});
});
It is worth noting that if the copied content comes from input box input, textarea, etc., use the copy object:
copy: function(){
return $( '#mytext').val();
}
If the copied content comes from page elements div, p, etc., use the copy object:
copy: $('#mytext').text( );