<?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>Latent Motion &#187; Plugins</title>
	<atom:link href="http://www.latentmotion.com/category/web-programming/plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.latentmotion.com</link>
	<description>Usability, Design and Front-Side Programming</description>
	<lastBuildDate>Tue, 27 Jul 2010 05:40:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Create a jQuery Bookmarklet</title>
		<link>http://www.latentmotion.com/how-to-create-a-jquery-bookmarklet/</link>
		<comments>http://www.latentmotion.com/how-to-create-a-jquery-bookmarklet/#comments</comments>
		<pubDate>Thu, 20 May 2010 16:00:15 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[favelet]]></category>
		<category><![CDATA[javascript bookmarklet]]></category>
		<category><![CDATA[jquery bookmarklet]]></category>

		<guid isPermaLink="false">http://www.latentmotion.com/?p=475</guid>
		<description><![CDATA[
I suspect many of my readers have written at least one jQuery Plugin / Script. In this post, I&#8217;d like to show you how to get the most out of that script by also releasing it as a jQuery Bookmarklet. Below, you&#8217;ll find two examples of utilities that are ripe for bookmarkleting, as well as [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; padding-top: 5px;"><a class="trans80" style="margin: 0px 10px 20px 20px;" href="http://www.latentmotion.com/downloads/blank-bookmarklet-v1.js"><img style="border: none;" src="http://www.latentmotion.com/wp-content/themes/barecity_1.5/images/download-script.png" alt="" /></a></div>
<p>I suspect many of my readers have written at least one jQuery Plugin / Script. In this post, I&#8217;d like to show you how to get the most out of that script by also releasing it as a jQuery Bookmarklet. Below, you&#8217;ll find two examples of utilities that are ripe for bookmarkleting, as well as a prepared jQuery Bookmarklet file that you can easily modify for the purpose.</p>
<p><em>Note: Even if you haven&#8217;t written a jQuery plugin before, you&#8217;ll find bookmarkleting someone else&#8217;s plugin as easy as using it on a site.</em></p>
<p>Before I get to the code though &#8211; take a look at the payload. You can add the following links as bookmarklets by right-clicking and selecting &#8220;Add to bookmarks / favorites&#8221; (in Chrome, you press &#8220;ctrl+shift+b&#8221; to open the bookmark manager, and drag them over). You can try them before you bookmark them by simply clicking the links on this page too.</p>
<p><strong>Example One:<br />
<script type="text/javascript">// <![CDATA[
var linkster = "javascript:(function(){var head=document.getElementsByTagName('head')[0],script=document.createElement('script');script.type='text/javascript';script.src='http://www.latentmotion.com/downloads/tablesorter-bookmarklet-v1.js?' + Math.floor(Math.random()*99999);head.appendChild(script);})(); void 0";
linkster = '<a href="' + linkster + '">Table Column Sorter Bookmarklet</a>';
document.write(linkster);
// ]]&gt;</script></strong><br />
<a></a><br />
Clicking the above link will  add the <a href="http://tablesorter.com/docs/">table sorter jquery plugin</a> to the page, including its stylesheet, and it will apply the script to all tables on the page. Once it&#8217;s loaded, you can click on any of the table column headers to sort the rows by column values.</p>
<p><strong>Example Two:<br />
<script type="text/javascript">// <![CDATA[
var linkster = "javascript:(function(){var head=document.getElementsByTagName('head')[0],script=document.createElement('script');script.type='text/javascript';script.src='http://www.latentmotion.com/downloads/visualizer-bookmarklet-v1.js?' + Math.floor(Math.random()*99999);head.appendChild(script);})(); void 0";
linkster = '<a href="' + linkster + '">Table Visualizer Bookmarklet</a>';
document.write(linkster);
// ]]&gt;</script></strong><br />
<a></a></p>
<p>The visualizer bookmarklet will add graphical representations of the data in the table. As with the table sorter, this bookmarklet was adapted from a pre-existing plugin, Filament&#8217;s <a href="http://www.filamentgroup.com/lab/update_to_jquery_visualize_accessible_charts_with_html5_from_designing_with/">jQuery Visualize</a>.</p>
<table style="margin: 10px;">
<caption>2009 Employee Sales by Department</caption>
<thead>
<tr>
<td></td>
<th scope="col">food</th>
<th scope="col">auto</th>
<th scope="col">household</th>
<th scope="col">furniture</th>
<th scope="col">kitchen</th>
<th scope="col">bath</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Mary</th>
<td>190</td>
<td>160</td>
<td>40</td>
<td>120</td>
<td>30</td>
<td>70</td>
</tr>
<tr>
<th scope="row">Tom</th>
<td>3</td>
<td>40</td>
<td>30</td>
<td>45</td>
<td>35</td>
<td>49</td>
</tr>
<tr>
<th scope="row">Brad</th>
<td>10</td>
<td>180</td>
<td>10</td>
<td>85</td>
<td>25</td>
<td>79</td>
</tr>
<tr>
<th scope="row">Kate</th>
<td>40</td>
<td>80</td>
<td>90</td>
<td>25</td>
<td>15</td>
<td>119</td>
</tr>
</tbody>
</table>
<p><span id="more-475"></span></p>
<p>Cool stuff, right? Let&#8217;s get to how it works then &#8211; starting with the prepared jQuery Bookmarklet template. This is what I recommend you use when writing your own bookmarklets:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/*
 * jQuery Bookmarklet - version 1.0
 * Originally written by: Brett Barros
 * With modifications by: Paul Irish
 *
 * If you use this script, please link back to the source
 *
 * Copyright (c) 2010 Latent Motion (http://latentmotion.com/how-to-create-a-jquery-bookmarklet/)
 * Released under the Creative Commons Attribution 3.0 Unported License,
 * as defined here: http://creativecommons.org/licenses/by/3.0/
 *
 */</span>
&nbsp;
window.<span style="color: #660066;">bookmarklet</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>fullFunc<span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// These are the styles, scripts and callbacks we include in our bookmarklet:</span>
window.<span style="color: #660066;">bookmarklet</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    css <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://www.site.com/your.css'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    js  <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://www.site.com/your.js'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>    
<span style="color: #006600; font-style: italic;">//	jqpath : 'myCustomjQueryPath.js', &lt;-- option to include your own path to jquery</span>
    ready <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// The meat of your jQuery code goes here</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;body&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Hello World&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   	    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> fullFunc<span style="color: #009900;">&#40;</span>a<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #003366; font-weight: bold;">function</span> d<span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>b.<span style="color: #660066;">length</span><span style="color: #339933;">===</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>a.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span>$.<span style="color: #660066;">getScript</span><span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>d<span style="color: #009900;">&#40;</span>b.<span style="color: #660066;">slice</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #003366; font-weight: bold;">function</span> e<span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>$.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>b<span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>c<span style="color: #339933;">,</span>f<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;link&gt;&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>href<span style="color: #339933;">:</span>f<span style="color: #339933;">,</span>rel<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;stylesheet&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;head&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span>a.<span style="color: #660066;">jqpath</span><span style="color: #339933;">=</span>a.<span style="color: #660066;">jqpath</span><span style="color: #339933;">||</span><span style="color: #3366CC;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #003366; font-weight: bold;">var</span> c<span style="color: #339933;">=</span>document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;script&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>c.<span style="color: #660066;">type</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">;</span>c.<span style="color: #660066;">src</span><span style="color: #339933;">=</span>b<span style="color: #339933;">;</span>c.<span style="color: #000066;">onload</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>e<span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">css</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>d<span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">js</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>document.<span style="color: #660066;">body</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">jqpath</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>From top to bottom, what the <a href="http://www.latentmotion.com/downloads/blank-bookmarklet-v1.js">jQuery Bookmarklet Template</a> does is:</p>
<ol>
<li>Prepare the full bookmarklet function. This is the call to the minified code in the last line of the js file. It is in an uncompressed format at the bottom of this post for those interested, but most will never need to see it..</li>
<li>Create the configurations, including arrays to your CSS and JS files. You can load as many as you see fit, and the JS files will load asynchronously, ensuring that each file can reliably depend on the file before it.</li>
<li>Provides the callback function for your editing. Place whatever jQuery code you like here.</li>
</ol>
<p>In order to use that script, though, you&#8217;ll need to create a link that calls it. Here&#8217;s the code for that link:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;javascript:(function(){var head=document.getElementsByTagName('head')[0],script=document.createElement('script');script.type='text/javascript';script.src='http://www.site.com/your-javascript.js?' + Math.floor(Math.random()*99999);head.appendChild(script);})(); void 0&quot;&gt;Your Bookmarklet Name&lt;/a&gt;</pre></div></div>

<p>To some that might look like a handful, but don&#8217;t worry, the hard work is already done. All you need to do is change the url in that link to point to your javascript file, and add a little regular-ol-jQuery to that javascript file.</p>
<p>Ok, still with me? Great! Now let&#8217;s look at one of the actual live examples we used earlier on the page. Here&#8217;s how I included table sorter, which requires both a JS and CSS  file:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/*
 * jQuery Bookmarklet - version 1.0
 * Originally written by: Brett Barros
 * With modifications by: Paul Irish
 *
 * If you use this script, please link back to the source
 *
 * Copyright (c) 2010 Latent Motion (http://latentmotion.com/how-to-create-a-jquery-bookmarklet/)
 * Released under the Creative Commons Attribution 3.0 Unported License,
 * as defined here: http://creativecommons.org/licenses/by/3.0/
 *
 */</span>
&nbsp;
window.<span style="color: #660066;">bookmarklet</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>fullFunc<span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// These are the styles, scripts and callbacks we include in our bookmarklet:</span>
window.<span style="color: #660066;">bookmarklet</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    css <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://tablesorter.com/themes/blue/style.css'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    js  <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://tablesorter.com/jquery.tablesorter.js'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>    
<span style="color: #006600; font-style: italic;">//	jqpath : 'myCustomjQueryPath.js', &lt;-- option to include your own path to jquery</span>
    ready <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// Initiate table sorter</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;table&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tablesorter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;tablesorter&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 	
&nbsp;
   	    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> fullFunc<span style="color: #009900;">&#40;</span>a<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #003366; font-weight: bold;">function</span> d<span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>b.<span style="color: #660066;">length</span><span style="color: #339933;">===</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>a.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>return <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#125;</span>$.<span style="color: #660066;">getScript</span><span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>d<span style="color: #009900;">&#40;</span>b.<span style="color: #660066;">slice</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #003366; font-weight: bold;">function</span> e<span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>$.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>b<span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>c<span style="color: #339933;">,</span>f<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;link&gt;&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>href<span style="color: #339933;">:</span>f<span style="color: #339933;">,</span>rel<span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;stylesheet&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;head&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span>a.<span style="color: #660066;">jqpath</span><span style="color: #339933;">=</span>a.<span style="color: #660066;">jqpath</span><span style="color: #339933;">||</span><span style="color: #3366CC;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>b<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #003366; font-weight: bold;">var</span> c<span style="color: #339933;">=</span>document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;script&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>c.<span style="color: #660066;">type</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">;</span>c.<span style="color: #660066;">src</span><span style="color: #339933;">=</span>b<span style="color: #339933;">;</span>c.<span style="color: #000066;">onload</span><span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>e<span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">css</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>d<span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">js</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>document.<span style="color: #660066;">body</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">jqpath</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>For your convenience, you can also <a href="http://www.latentmotion.com/jquery-bookmarklet/tablesorter-bookmarklet.js">download the script as a JS file</a>.</p>
<p>And that&#8217;s about it! Sorta, anyway. Here&#8217;re some bonus thoughts for the real enthusiasts:</p>
<ol>
<li>Bookmarklets leverage caching, big time. When developing, I found this to be a major frustration, so I added a large random number at the end of the js call, which effectively forces a reload each time the javascript is called. Upon deployment &#8211; you may choose to remove it, but keep it in mind next time you make a change and don&#8217;t see the effects.</li>
<li>Another reason I force refreshing of my js file is because I want to be able to update my scripts without forcing my users to re-bookmark them.</li>
<li>If you create your own bookmarklet and want to post about it in wordpress, you&#8217;ll quickly learn you need a workaround. The first one I used was hardcoding the links in an external page, and displaying them through an iframe. It worked, but was lame. Now I&#8217;m using javascript to store the desired a href as a variable, then I wrap that variable with the tags, and finally I document.write it. If you have a better idea, let me know.</li>
<li>The table examples that I&#8217;ve provided on this page are based on pre-existing jQuery plugins. Those plugins assume that tables are correctly formatted, with table headers etc. If a website&#8217;s layout was built in the 90s and still uses tables for page structure, the results won&#8217;t be pretty. </li>
<li>Sadly, Disqus (the host service for my comments below) uses tables. This of course conflicts with the specific table examples I used above, and can be resolved by refreshing. I&#8217;m sure it&#8217;s possible to set the bookmarklet to listen for a click of a table, but that&#8217;s beyond the scope of the current script/lesson.</li>
</ol>
<p>And here&#8217;s some extra credit reading:</p>
<ul>
<li><a href="http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet">Learning jQuery</a> made me realize that loading jQuery dynamically is possible. Almost ironically, Paul Irish helped with some modifications over there too.</li>
<li>After writing this article, I was informed <a href="http://benalman.com/projects/run-jquery-code-bookmarklet/">Ben Alman</a> had already written a similar script. His actually includes a &#8220;generator&#8221; that will use your jquery code and embed it for you, which is cool. It doesn&#8217;t include a loop to first include javascript / css files, but he probably figured it was easy enough to add yourself.</li>
<li><a href="http://iamnotagoodartist.com/">Tommy</a>, at <a href="http://www.smashingmagazine.com/2010/05/23/make-your-own-bookmarklets-with-jquery/">Smashing Magazine</a>, wrote a much more in-depth article about the details and options when writing a jQuery bookmarklet. Although it was posted a few days after I posted mine, he had submitted it months in advance. Smart guy <img src='http://www.latentmotion.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li><a href="http://marklets.com">Marklets</a> is a pretty nifty bookmark database that gives you searchable access to triggering any script in the arsenal. The creator and I are discussing a joint bookmarkleting project. Contact me if you&#8217;re interested in making bookmarklets kick ass again.</li>
</ul>
<p>If you have any ideas, questions, or musings, I&#8217;d love to hear &#8216;em! Please add your comment below.</p>
<p><em><strong>Update:</strong> <a href="http://paulirish.com/">Paul Irish</a> was kind enough to help improve this script and teach me a couple things along the way. The following is the unminified version of what I&#8217;ve listed above, and includes his structural changes.</em></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/*
 * jQuery Bookmarklet - version 1.0
 * Originally written by: Brett Barros
 * Heavily modified by: Paul Irish
 *
 * If you use this script, please link back to the source
 *
 * Copyright (c) 2010 Latent Motion (http://latentmotion.com/how-to-create-a-jquery-bookmarklet/)
 * Released under the Creative Commons Attribution 3.0 Unported License,
 * as defined here: http://creativecommons.org/licenses/by/3.0/
 *
 */</span>
&nbsp;
window.<span style="color: #660066;">bookmarklet</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>fullFunc<span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// These are the styles, scripts and callbacks we include in our bookmarklet:</span>
window.<span style="color: #660066;">bookmarklet</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    css <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://tablesorter.com/themes/blue/style.css'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    js  <span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'http://tablesorter.com/jquery.tablesorter.js'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>    
<span style="color: #006600; font-style: italic;">//	jqpath : 'myCustomjQueryPath.js', &lt;-- option to include your own jquery</span>
    ready <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// Initiate table sorter</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;table&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">tablesorter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;tablesorter&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 	
&nbsp;
   	    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> fullFunc<span style="color: #009900;">&#40;</span>opts<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// User doesn't have to set jquery, we have a default.</span>
    opts.<span style="color: #660066;">jqpath</span> <span style="color: #339933;">=</span> opts.<span style="color: #660066;">jqpath</span> <span style="color: #339933;">||</span> <span style="color: #3366CC;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">function</span> getJS<span style="color: #009900;">&#40;</span>jsfiles<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// Check if we've processed all of the JS files (or if there are none)</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>jsfiles.<span style="color: #660066;">length</span> <span style="color: #339933;">===</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		opts.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// Load the first js file in the array</span>
        $.<span style="color: #660066;">getScript</span><span style="color: #009900;">&#40;</span>jsfiles<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>  <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> 
&nbsp;
            <span style="color: #006600; font-style: italic;">// When it's done loading, remove it from the queue and call the function again    </span>
            getJS<span style="color: #009900;">&#40;</span>jsfiles.<span style="color: #660066;">slice</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// Synchronous loop for css files</span>
    <span style="color: #003366; font-weight: bold;">function</span> getCSS<span style="color: #009900;">&#40;</span>csfiles<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        $.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>csfiles<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span> val<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;link&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                    href<span style="color: #339933;">:</span> val<span style="color: #339933;">,</span>
                    rel<span style="color: #339933;">:</span> <span style="color: #3366CC;">'stylesheet'</span>
                <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'head'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #003366; font-weight: bold;">function</span> getjQuery<span style="color: #009900;">&#40;</span>filename<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// Create jQuery script element</span>
		<span style="color: #003366; font-weight: bold;">var</span> fileref <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span>
		fileref.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span>
		fileref.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span>  filename<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #006600; font-style: italic;">// Once loaded, trigger other scripts and styles</span>
		fileref.<span style="color: #000066;">onload</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
			getCSS<span style="color: #009900;">&#40;</span>opts.<span style="color: #660066;">css</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// load CSS files</span>
			getJS<span style="color: #009900;">&#40;</span>opts.<span style="color: #660066;">js</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// load JS files</span>
&nbsp;
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
		document.<span style="color: #660066;">body</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>fileref<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	getjQuery<span style="color: #009900;">&#40;</span>opts.<span style="color: #660066;">jqpath</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// kick it off</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// end of bookmarklet();</span></pre></div></div>





	<a rel="nofollow" class="digg" target="_blank" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fhow-to-create-a-jquery-bookmarklet%252F%26amp%3Btitle%3DHow%2520to%2520Create%2520a%2520jQuery%2520Bookmarklet%26amp%3Bbodytext%3D%250D%250AI%2520suspect%2520many%2520of%2520my%2520readers%2520have%2520written%2520at%2520least%2520one%2520jQuery%2520Plugin%2520%252F%2520Script.%2520In%2520this%2520post%252C%2520I%2527d%2520like%2520to%2520show%2520you%2520how%2520to%2520get%2520the%2520most%2520out%2520of%2520that%2520script%2520by%2520also%2520releasing%2520it%2520as%2520a%2520jQuery%2520Bookmarklet.%2520Below%252C%2520you%2527ll%2520find%2520two%2520examples%2520of%2520utilities%2520that';" title="Digg"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" class="sphinn" target="_blank" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fhow-to-create-a-jquery-bookmarklet%252F';" title="Sphinn"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" class="del.icio.us" target="_blank" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fhow-to-create-a-jquery-bookmarklet%252F%26amp%3Btitle%3DHow%2520to%2520Create%2520a%2520jQuery%2520Bookmarklet%26amp%3Bnotes%3D%250D%250AI%2520suspect%2520many%2520of%2520my%2520readers%2520have%2520written%2520at%2520least%2520one%2520jQuery%2520Plugin%2520%252F%2520Script.%2520In%2520this%2520post%252C%2520I%2527d%2520like%2520to%2520show%2520you%2520how%2520to%2520get%2520the%2520most%2520out%2520of%2520that%2520script%2520by%2520also%2520releasing%2520it%2520as%2520a%2520jQuery%2520Bookmarklet.%2520Below%252C%2520you%2527ll%2520find%2520two%2520examples%2520of%2520utilities%2520that';" title="del.icio.us"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="rss" target="_blank" href="javascript:window.location='http%3A%2F%2Fwww.latentmotion.com%2Ffeed%2F';" title="RSS"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow" class="twitter" target="_blank" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DHow%2520to%2520Create%2520a%2520jQuery%2520Bookmarklet%2520-%2520http%253A%252F%252Fwww.latentmotion.com%252Fhow-to-create-a-jquery-bookmarklet%252F';" title="Twitter"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.latentmotion.com/how-to-create-a-jquery-bookmarklet/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Automated Link Building &#8211; White Hat Style</title>
		<link>http://www.latentmotion.com/automated-link-building-white-hat-style/</link>
		<comments>http://www.latentmotion.com/automated-link-building-white-hat-style/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 13:00:26 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[SEO (Organic)]]></category>
		<category><![CDATA[automated link building]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[link building]]></category>
		<category><![CDATA[text selection]]></category>

		<guid isPermaLink="false">http://www.latentmotion.com/?p=419</guid>
		<description><![CDATA[Yaknow, most of the time, black hat SEOs have all the fun. When you don&#8217;t have to follow the rules, the world of SEO opens up to mathematically generated content, canned-ham links, and any number of script based processes. Well, today is the day of the white hat, because I&#8217;ve just written a killer link [...]]]></description>
			<content:encoded><![CDATA[<p>Yaknow, most of the time, black hat SEOs have all the fun. When you don&#8217;t have to follow the rules, the world of SEO opens up to mathematically generated content, canned-ham links, and any number of script based processes. Well, today is the day of the white hat, because I&#8217;ve just written a killer link building script that will amplify your honest successes.</p>
<p><a href="http://www.seox.org">Link Building Pro</a>, based at seox.org, will automatically add a citation to the footer of any text copied from your website. Unlike other similar solutions, though, it specifically uses the meta keywords from the page as the anchor text &#8211; ensuring that the links use the precise keywords you&#8217;re optimizing for. And, here&#8217;s the best part, any text within the selection that matches the text of another link on the page will automatically be converted into that link. As a consequence, if this selection is then copied into the user&#8217;s site, you&#8217;ve not only gained one link of citation, but also as many links as logically apply to the text itself.</p>
<p>Of course, what makes this white hat is that it&#8217;s all <strong>voluntary</strong>. The user <em>could easily</em> remove the links if he chooses. But the default switches from being no citation or link to several, and as the default action is the easiest, it is also the one most often taken.</p>
<p>PS: Unfortunately, my previous script &#8220;Search and Share&#8221; interferes this script (doh!). For now, you&#8217;ll have to pick one or the other, but I&#8217;ve got big integration plans for the future!</p>




	<a rel="nofollow" class="digg" target="_blank" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fautomated-link-building-white-hat-style%252F%26amp%3Btitle%3DAutomated%2520Link%2520Building%2520-%2520White%2520Hat%2520Style%26amp%3Bbodytext%3DYaknow%252C%2520most%2520of%2520the%2520time%252C%2520black%2520hat%2520SEOs%2520have%2520all%2520the%2520fun.%2520When%2520you%2520don%2527t%2520have%2520to%2520follow%2520the%2520rules%252C%2520the%2520world%2520of%2520SEO%2520opens%2520up%2520to%2520mathematically%2520generated%2520content%252C%2520canned-ham%2520links%252C%2520and%2520any%2520number%2520of%2520script%2520based%2520processes.%2520Well%252C%2520today%2520is%2520the%2520day%2520of%2520t';" title="Digg"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" class="sphinn" target="_blank" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fautomated-link-building-white-hat-style%252F';" title="Sphinn"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" class="del.icio.us" target="_blank" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fautomated-link-building-white-hat-style%252F%26amp%3Btitle%3DAutomated%2520Link%2520Building%2520-%2520White%2520Hat%2520Style%26amp%3Bnotes%3DYaknow%252C%2520most%2520of%2520the%2520time%252C%2520black%2520hat%2520SEOs%2520have%2520all%2520the%2520fun.%2520When%2520you%2520don%2527t%2520have%2520to%2520follow%2520the%2520rules%252C%2520the%2520world%2520of%2520SEO%2520opens%2520up%2520to%2520mathematically%2520generated%2520content%252C%2520canned-ham%2520links%252C%2520and%2520any%2520number%2520of%2520script%2520based%2520processes.%2520Well%252C%2520today%2520is%2520the%2520day%2520of%2520t';" title="del.icio.us"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="rss" target="_blank" href="javascript:window.location='http%3A%2F%2Fwww.latentmotion.com%2Ffeed%2F';" title="RSS"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow" class="twitter" target="_blank" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DAutomated%2520Link%2520Building%2520-%2520White%2520Hat%2520Style%2520-%2520http%253A%252F%252Fwww.latentmotion.com%252Fautomated-link-building-white-hat-style%252F';" title="Twitter"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.latentmotion.com/automated-link-building-white-hat-style/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Best Viral Marketing Text Citation (jQuery / WordPress) Plugin</title>
		<link>http://www.latentmotion.com/the-best-link-bait-citation-plugin/</link>
		<comments>http://www.latentmotion.com/the-best-link-bait-citation-plugin/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 15:20:15 +0000</pubDate>
		<dc:creator>Brett</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[SEO (Organic)]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.latentmotion.com/?p=199</guid>
		<description><![CDATA[
Everyone&#8217;s seen social bookmarks, and yeah, they&#8217;re great. But even with them, your visitor has to specifically seek out promoting you. On the other hand, when you highlight and copy text from politico.com, it will automatically embed the URL.
Holy crap that&#8217;s cool!
Naturally, I wanted to do it too. But soon after beginning, I realized that [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right; margin-top:-40px;"><a href="http://www.latentmotion.com/downloads/search-and-share-0.9.3-jquery.zip" style="margin:0 0 20px 30px;" ><img src="http://www.latentmotion.com/wp-content/themes/barecity_1.5/images/download-script.png" style="border:none;" class="trans80" /></a><a href="http://www.latentmotion.com/downloads/search-and-share-0.9.3-wordpress.zip" style="margin:0 0 20px 30px;"><img src="http://www.latentmotion.com/wp-content/themes/barecity_1.5/images/download-plugin.png" style="border:none;" class="trans80" /></a></div>
<p>Everyone&#8217;s seen social bookmarks, and yeah, they&#8217;re great. But even with them, your visitor has to specifically seek out promoting you. On the other hand, <strong>when you highlight and copy text from politico.com, it will automatically embed the URL.</strong></p>
<p><em>Holy crap that&#8217;s cool!</em></p>
<p>Naturally, I wanted to do it too. But soon after beginning, I realized that there was still so much more to do. What is it that people wanted to do with the copied text? If the selection is long, perhaps it&#8217;s email or twitter. If it&#8217;s short (like a name or place), I&#8217;d bet it&#8217;s a search. <strong>My plugin takes Politico&#8217;s brilliant idea and gives it what Barry Bonds got.</strong></p>
<p>To see the script in action, <strong>try highlighting any text on this page.</strong> For email or copy/paste credit, select 40+ characters of text. For specific search-worthy examples, try:</p>
<ul>
<li><strong>Wiki: </strong>Machiavelli</li>
<li><strong>Google:</strong> World Trade Center, NY</li>
<li><strong>Facts (Wolfram):</strong> Hamburgers</li>
<li><strong>Amazon:</strong> 1984 by George Orwell</li>
<li><strong>Ebay:</strong> XBOX 360</li>
</ul>
<p>For more information about this plugin, visit the official <strong><a href="http://www.latentmotion.com/search-and-share/">Search and Share</a></strong> page. If you like it, I&#8217;d really appreciate you bumping me up on the social network of your choice. Thanks for the love!</p>
<p>PS: In case you missed the links the first time around, you can <a href="http://www.latentmotion.com/downloads/SearchAndSharePlugin-0.9.zip">download the standalone jQuery version here</a>, and you can <a href="http://www.latentmotion.com/downloads/SearchAndShareScript-0.9.zip">download the wordpress version here</a>.</p>




	<a rel="nofollow" class="digg" target="_blank" href="javascript:window.location='http%3A%2F%2Fdigg.com%2Fsubmit%3Fphase%3D2%26amp%3Burl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fthe-best-link-bait-citation-plugin%252F%26amp%3Btitle%3DThe%2520Best%2520Viral%2520Marketing%2520Text%2520Citation%2520%2528jQuery%2520%252F%2520WordPress%2529%2520Plugin%26amp%3Bbodytext%3DEveryone%2527s%2520seen%2520social%2520bookmarks%252C%2520and%2520yeah%252C%2520they%2527re%2520great.%2520But%2520even%2520with%2520them%252C%2520your%2520visitor%2520has%2520to%2520specifically%2520seek%2520out%2520promoting%2520you.%2520On%2520the%2520other%2520hand%252C%2520when%2520you%2520highlight%2520and%2520copy%2520text%2520from%2520politico.com%252C%2520it%2520will%2520automatically%2520embed%2520the%2520URL.%250D%250A%250D%250AHol';" title="Digg"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" class="sphinn" target="_blank" href="javascript:window.location='http%3A%2F%2Fsphinn.com%2Findex.php%3Fc%3Dpost%26m%3Dsubmit%26link%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fthe-best-link-bait-citation-plugin%252F';" title="Sphinn"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" class="sociable-hovers" /></a>
	<a rel="nofollow" class="del.icio.us" target="_blank" href="javascript:window.location='http%3A%2F%2Fdelicious.com%2Fpost%3Furl%3Dhttp%253A%252F%252Fwww.latentmotion.com%252Fthe-best-link-bait-citation-plugin%252F%26amp%3Btitle%3DThe%2520Best%2520Viral%2520Marketing%2520Text%2520Citation%2520%2528jQuery%2520%252F%2520WordPress%2529%2520Plugin%26amp%3Bnotes%3DEveryone%2527s%2520seen%2520social%2520bookmarks%252C%2520and%2520yeah%252C%2520they%2527re%2520great.%2520But%2520even%2520with%2520them%252C%2520your%2520visitor%2520has%2520to%2520specifically%2520seek%2520out%2520promoting%2520you.%2520On%2520the%2520other%2520hand%252C%2520when%2520you%2520highlight%2520and%2520copy%2520text%2520from%2520politico.com%252C%2520it%2520will%2520automatically%2520embed%2520the%2520URL.%250D%250A%250D%250AHol';" title="del.icio.us"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" class="rss" target="_blank" href="javascript:window.location='http%3A%2F%2Fwww.latentmotion.com%2Ffeed%2F';" title="RSS"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a>
	<a rel="nofollow" class="twitter" target="_blank" href="javascript:window.location='http%3A%2F%2Ftwitter.com%2Fhome%3Fstatus%3DThe%2520Best%2520Viral%2520Marketing%2520Text%2520Citation%2520%2528jQuery%2520%252F%2520WordPress%2529%2520Plugin%2520-%2520http%253A%252F%252Fwww.latentmotion.com%252Fthe-best-link-bait-citation-plugin%252F';" title="Twitter"><img src="http://www.latentmotion.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.latentmotion.com/the-best-link-bait-citation-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
