jJuery zclip 在第一次点击时不起作用。它适用于第二次点击?
<script type="text/javascript"> function initiateCopy(){
$("a#copyDetails").zclip({
path:'{% get_static_prefix %}scripts/ZeroClipboard.swf',
copy:function(){
userDetails = '';
user = JSON.parse($("#copyDetails").attr('rel'));
$.each(user, function(key, value) {
userDetails += key+": "+value;
});
return userDetails;
}
});
} </script> <a id="copyDetails" href="javascript:initiateCopy()">Copy Details</a>
谢谢!