<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Skull Jackpot &#187; clipboard</title>
	<atom:link href="http://skulljackpot.com/tagged-as/clipboard/feed/" rel="self" type="application/rss+xml" />
	<link>http://skulljackpot.com</link>
	<description>Various thoughts of minimal interest to others</description>
	<lastBuildDate>Fri, 25 Feb 2011 16:22:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Click to Clipboard</title>
		<link>http://skulljackpot.com/2008/10/06/click-to-clipboard/</link>
		<comments>http://skulljackpot.com/2008/10/06/click-to-clipboard/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 20:40:00 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Under the hood]]></category>
		<category><![CDATA[clipboard]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://skulljackpot.com/?p=10</guid>
		<description><![CDATA[<p>Our team uses <a href="http://skitch.com/">Skitch</a> a lot. It's a pretty invaluable tool for communicating visual information - you can easily annotate screenshots or comps. There's great communicative value in being able to point at something, and as a remote employee in my past two jobs, I can't imagine ever collaborating on web work without it.</p>
<p>Skitch does a lot of things well, but one bit of polish which always pops out at new users is the "Click to Clipboard" functionality. Skitch provides lots of ways for you to share your images, and when you click in the appropriate field, the site copies all the data to your computer's clipboard, and presents a nice confirmation that you're ready to paste that elsewhere.</p>]]></description>
			<content:encoded><![CDATA[<p>Our team uses <a href="http://skitch.com/">Skitch</a> a lot. It&#8217;s a pretty invaluable tool for communicating visual information &#8211; you can easily annotate screenshots or comps. There&#8217;s great communicative value in being able to point at something, and as a remote employee in my past two jobs, I can&#8217;t imagine ever collaborating on web work without it.</p>
<p><strong>Aside</strong>: Skitch is Mac-only, but I&#8217;ve heard good things about <a href="http://www.jingproject.com/">Jing</a> if you&#8217;re on Windows. I don&#8217;t know of an equivalent solution on Linux, unfortunately.</p>
<p>Skitch does a lot of things well, but one bit of polish which always pops out at new users is the &#8220;Click to Clipboard&#8221; functionality. Skitch provides lots of ways for you to share your images, and when you click in the appropriate field, the site copies all the data to your computer&#8217;s clipboard, and presents a nice confirmation that you&#8217;re ready to paste that elsewhere:</p>
<div class="thumbnail"><a href="http://skitch.com/dimmerswitch/a7n7/skitch-clipboard-popup"><img src="http://img.skitch.com/20081006-1riux9tfy8ibu8nfwg84ceuqqs.preview.jpg" alt="skitch-clipboard-popup" title="Using Skitch to illustrate a feature on Skitch - so very, very meta." /></a></div>
<p>I decided to create a workalike function in <a href="http://jquery.com/">jQuery</a>, my favorite javascript library. I got a rudimentary version up and running a while back, building on the approach Jeff Larson wrote up, over at <a href="http://www.jeffothy.com/weblog/clipboard-copy/">http://www.jeffothy.com/weblog/clipboard-copy/</a>.</p>
<p>Today, I was able to get my workalike polished up and turned into my first jQuery plugin &#8211; it&#8217;s available at <a href="http://github.com/chrispatterson/jquery-clipboard/tree/master">http://github.com/chrispatterson/jquery-clipboard/tree/master</a>. There are still some pieces of polish I&#8217;m planning to add, but I&#8217;m pretty happy with it so far.</p>
<h3>Using the plugin</h3>
<p><strong>Note</strong>: this assumes that you&#8217;ve downloaded jQuery (<a href="http://docs.jquery.com/Downloading_jQuery">http://docs.jquery.com/Downloading_jQuery</a>), the jQuery Flash plugin (<a href="http://jquery.lukelutman.com/plugins/flash/">http://jquery.lukelutman.com/plugins/flash/</a>), and the jQuery Clipboard plugin (<a href="http://github.com/chrispatterson/jquery-clipboard/tree/master">http://github.com/chrispatterson/jquery-clipboard/tree/master</a>). All examples can be used at the bottom of the page (immediately before the &lt;/body&gt; tag), or set to fire with <code>$(document).ready</code></p>
<p>To add &#8220;click to clipboard&#8221; behavior to the element with an id of <code>share-link</code>:</p>
<p><code>$('#share-link').clickToClipboard();</code></p>
<p>To add &#8220;click to clipboard&#8221; behavior to all elements with a class of <code>shareable</code>:</p>
<p><code>$('.shareable').clickToClipboard();</code></p>
<p>clickToClipboard allows you to customize how long it takes for the notice to fade out, as well as the message used (for cases where you don&#8217;t want to use an image).</p>
<p>To have a slower fade effect, starting 1.5 seconds after the target element loses focus:</p>
<p><code>$('#share-link').clickToClipboard( {fadeoutLength: 900, fadeoutTimer: 1500}););</code></p>
<p>To customize the notice text:</p>
<p><code>$('#share-link').clickToClipboard( {clipboardText: "You're ready to paste!"}););</code></p>
<p>The look and feel of the notice is totally customizable through CSS. I&#8217;ve included a demo in <a href="http://github.com/chrispatterson/jquery-inline-info/tree/master">the github repository</a>, which shows how it might look with a background image. This is my first jQuery plugin, so I&#8217;m definitely open to feedback on ways to structure things better, or enhancement requests on how it be more flexible about supporting stuff folks need.</p>
]]></content:encoded>
			<wfw:commentRss>http://skulljackpot.com/2008/10/06/click-to-clipboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.195 seconds -->

