Domanda

How can I do that?

is it that simple I can't find how?

I'm doing this without success

function CopyStuff() {
    var textCopy = " text to copy \n is here}";
    zclip({
        path: "http://zeroclipboard.googlecode.com/svn-history/r10/trunk/ZeroClipboard.swf",
        copy: textCopy
    });
}
È stato utile?

Soluzione

Zclip is it is a very useful tool but still quite buggy. Working with this plugin I have noticed that it is really unstable, it's functionality depends on how the DOM renders.

Your main problem in your script is that you are not assigning any element in order to initialise and fire the copy event, usually this is a link or a button. Take a look on an example I made using a class and an ID of a div

http://jsfiddle.net/XD6JM/

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top