ZeroClipboard.setDefaults({ moviePath: "ZeroClipboard-master/ZeroClipboard.swf" })
$(".copyoption1").live('click', function (e) {
if (window.clipboardData)
{
window.clipboardData.setData("Text", selection);
$(".copyoptions").hide();
}
else {
var clip = new ZeroClipboard($(".copyoption1"));
clip.on('mousedown', function (client) {
clip.setText("My Text");
});
}
});
I used this code and place my webpage with css and javascript files on server not on local then it worked..:-)