I have read the wiki in the plugin page, searched and researched but i still cant get zropClipboard to work...
- i am not getting any javascript error...
- the text is being alerted correctly but wont get to my clipboard
This is my code:
var clip = new ZeroClipboard($('.copythis'));
clip.on('load', function(client) {
// alert( "movie is loaded" );
});
clip.on('complete', function(client, args) {
alert("Copied text to clipboard: " + args.text );
});
clip.on('mouseover', function(client) {
// alert("mouse over");
});
clip.on('mouseout', function(client) {
// alert("mouse out");
});
clip.on( 'mousedown', function(client) {
var copythis = '#' + $(this).attr('cliptarget');
var copytext = $(copythis).val();
client.setText(copytext); // ALSO TRIED: clip.setText(copytext);
alert(copytext); // THIS ALERTS THE RIGHT TEXT
});
clip.on( 'mouseup', function(client) {
// alert("mouse up");
});
I really want to get it to work... Would apreaciate your help.
Try replacing
mousedown
withdataRequested
.