Reputation: 5013
Javascript finally has the "copy" event and we no longer have to use flash! (well, we still should use flash as a fallback).
http://dev.w3.org/2006/webapi/clipops/#x3.1.1-copy-event
I'm trying to figure out how to: Click on an anchor tag (Copy) and it copies the (text input src /or innerHTML) to the clipboard. Here's a fiddle of the HTML/CSS http://jsfiddle.net/LkUhM/
Can anyone guide me?
:::::HTML:::::
<div>
<ul>
<li><input type="text" class="input" value="This is the next that will be copied!" /><a href="#" id="copy" class="copy">Copy!</a></li>
<li><input type="text" class="input" value="This is the next that will be copied!" /><a href="#" id="copy" class="copy">Copy!</a></li>
<li><input type="text" class="input" value="This is the next that will be copied!" /><a href="#" id="copy" class="copy">Copy!</a></li>
<li><input type="text" class="input" value="This is the next that will be copied!" /><a href="#" id="copy" class="copy">Copy!</a></li>
</ul>
<textarea></textarea>
Upvotes: 0
Views: 493
Reputation: 1311
Upvotes: 1