Answer the question
In order to leave comments, you need to log in
Copy text button. What's wrong?
Most likely, the question is idiotic, I apologize in advance :)
I need to make a simple "copy text" button. On steamdev.com/zclip I found the simplest, it seems, option, but it does not work. What did I write wrong?
(the /js folder contains jquery.js files from here , jquery.zclip.js and ZeroClipboard.swf)
<html><head>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.zclip.js"></script>
</head>
<body>
<script>
$(document).ready(function(){
$('a#copy-description').zclip({
path:'js/ZeroClipboard.swf',
copy:$('p#description').text()
});
</script>
<div >
<a id="copy-description" href="#">скопировать</a><p id="description"> текст</p>
</div>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
By the way, in their example they use a different version of jquery ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery....
try with it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question