Zclip doesn't work on the JsFiddle

125 views Asked by At

I was looking for the Zclip examples on the JsFiddle. I found several examples which must work (at least according to the words of the users). For example, this one http://jsfiddle.net/tj7ZX/5/

HTML

<p id="description">Text to copy</p>
<a href="#" id="copy">Click here to copy</a>

jQuery

    $(document).ready(function () {
     $('#copy').zclip({
         path: 'http://www.steamdev.com/zclip/js/ZeroClipboard.swf',
         copy: $('#description').text(),
         beforeCopy: function () {
             $('#description').css('background', 'yellow');
         },
         afterCopy: function () {
             $('#description').css('background', 'green');
         }
     }); });

or this one http://jsfiddle.net/dloewen/Ny9We/2/

HTML

 <table>
    <tr>
        <td>
            <span class="z-clip-wrap">
                <a href="#" class="z-clip hidden">copy</a>
            </span>
            <span>12345</span>
        </td>
        <td>
            <span class="z-clip-wrap">
                <a href="#" class="z-clip hidden">copy</a>
            </span>
            <span>67890</span>
        </td>
    </tr>
</table>

jQuery

     $(document).ready(function() {

    $(".z-clip").zclip({
        path: "http://www.steamdev.com/zclip/js/ZeroClipboard.swf",
        copy: function() {
            return $(this).parent().next().text();
        },
        afterCopy: function() {
           alert('copied');
        }
    });
});

But links on the JsFiddle aren't clickable. What could be problem?

0

There are 0 answers