I am trying to implement zero clipboard on my web mobile application but I can't make it work. Can you help me checking what I am doing wrong? Cheers!
HTML code:
<div class="p_btns" style="">
<input type="hidden" id="copy_field" value="cool">
<div id="btn_copy" class="p_btns_link" >Copy my referral link</div>
JS ZCLIP
<script type="text/javascript">
$("#btn_copy").zclip({
path:'js/ZeroClipboard.swf',
copy:$("input#copy_field").val(),
beforeCopy:function(){
$( "#btn_copy" ).animate({
backgroundColor: "#70c280",
color: "#fff",
}, 100 );
},
afterCopy:function(){
$( "#btn_copy" ).animate({
backgroundColor: "#4e798f",
color: "#fff",
}, 500 );
alert('copied');
}
});
Unfortunately there zClip does not work on iOS =/