Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging jQuery and zclip plugin

Can anyone tell me why this code is not working?

Link to zclip: http://www.steamdev.com/zclip/

Working example: http://jsfiddle.net/f4gZA/

Thanks in advance.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="http://www.steamdev.com/zclip/js/jquery.zclip.min.js"></script>
<script type="text/javascript" src="http://www.steamdev.com/zclip/js/jquery.snippet.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#copy-button").zclip({
    path: "http://www.steamdev.com/zclip/js/ZeroClipboard.swf",
    copy: function() {
        return $(this).prev().text();
    }
});

});
</script>

<div id='copy'>Test</div>
<button id='copy-button'>copy</button>
like image 673
zack Avatar asked Jul 20 '11 03:07

zack


1 Answers

I got it to work. problem comes when im using local host. when i uploaded to the sever it work. thanks

like image 79
Paul Sweatte Avatar answered Sep 18 '22 23:09

Paul Sweatte