Anthony Pipkin![]()
Instantiate in your body and give it a series of selectors used to activate. A click event will copy the requested text to the clipboard. Also gives the ability for a single target to copy from.
This example uses a single clipboard instance to move about the page when you mouse over a clipTarget.
When the clipboard is clicked on, the clipTarget's contents are copied and you can paste them in the textarea provided.
Notice, we use mouseover to move the clipboard under our cursor and above our target element. This makes it so when we click to copy, we are actually clicking on the SWF.
<script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"></script><div class="xarno-clipboard-copy">Click me <strong>to</strong> copy: A</div>
<div class="xarno-clipboard-copy">Click me to copy: B</div>
<textarea>No forum posts for this module.
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info