Smart    Lucky

Smart Lucky

  • NA
  • 555
  • 639.2k

Problem Facing On Copy code Click Button

Apr 30 2014 3:10 AM

Hi dudes

It is not working i am trying to execute below code as a demo and when i am clicking on button, button is stock mean on click event not  working

can any one help me please...


<html>
<head>
    <script src ="jquery.js"></script>
    <script src ="jquery.zclip.js"></script>
    <script >
    $(document).ready(function(){
        $("#elementid").zclip({
        path:'ZeroClipboard.swf',
        copy:$('#elementid').attr('data-clipboard-text'),
    beforeCopy:function(){
        alert('before Copy Alert');
    },
    afterCopy:function(){
        alert('After Copy Alert');
    }
});
});

        </script>
<body>
<input type="text"  id ="targetid"></button>
<button  id ="elementid" data-clipboard-text ="data for copy" >copy</button>
</body>
</head>
<html>

Answers (1)