I'm using this link library to copy text by clicking the button for the user's clipboard. I'm trying to find a way to change it a bit, but to no avail.
The basics of using the library are:
<html>
<body>
<div id="d_clip_button" class="clip_button" data-clipboard-text="Copy Me!" title="Click to copy." style="border:1px solid black; padding:20px;">Copy To Clipboard</div>
<script type="text/javascript" src="ZeroClipboard.js"></script>
<script type="text/javascript">
var client = new ZeroClipboard( document.getElementById('d_clip_button') );
</script>
</body>
</html>
What I want to change is when the user clicks on the div of id="d_clip_button" it has to return a JQUERY value that is in a variable into data-clipboard-text , so I can dynamically generate values from a database, I did several tests, but I could not find the solution, can I do this, or does this library only work with static text? If the answer is YES, do I have any way of doing what I want?