Your code sets up zclip to start watching for clicks, after it's clicked once.
$(document).ready(function()
{
//$('#copyTxt').click(function()
// {
//alert($('#fe_text').val());
$('#copyTxt').zclip(
{
path: 'ZeroClipboard.swf',
copy: function(){ return $('#fe_text').val(); },
afterCopy: function()
{
console.log($('#fe_text').val() + " was copied to clipboard");
}
});
// });
});
If you look at their documentation, it shows the zclip plugin being called directly inside $(document).ready
.