<?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>Aaron As a Chimp &#187; jQuery</title>
	<atom:link href="http://sachimp.com/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://sachimp.com</link>
	<description>with a typewriter</description>
	<lastBuildDate>Sat, 18 Jun 2011 15:26:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Why plain, vanilla, anchors are a bad idea.</title>
		<link>http://sachimp.com/2010/03/29/bad-anchors/</link>
		<comments>http://sachimp.com/2010/03/29/bad-anchors/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 16:32:17 +0000</pubDate>
		<dc:creator>AaronAsAChimp</dc:creator>
				<category><![CDATA[Sachimp Labs]]></category>
		<category><![CDATA[anchors]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://sachimp.com/?p=153</guid>
		<description><![CDATA[A few days ago I was testing a soon to be released site. I followed a link I had never seen before and suddenly found my self confused and disoriented. In retrospect it could&#8217;ve been the fact I had just ran into a glass door on my way in (I totally didn&#8217;t see it there). [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>A few days ago I was testing a soon to be released site. I followed a link I had never seen before and suddenly found my self confused and disoriented.  In retrospect it could&#8217;ve been the fact I had just ran into a glass door on my way in (I totally didn&#8217;t see it there).</p>
<p>But, never the less, it lead me to tweet this:</p>
<p><a class="tweet" href="http://twitter.com/AaronAsAChimp/status/11090674594">GUIDELINE: Users should never &#8220;teleport&#8221; between areas of the page. This can be disorienting. Show the movement from one place to the other.</a></p>
<h3>Ice, Ice, Baby</h3>
<p>The reason why I suggested that is not because of the severe &#8220;bling&#8221; deficiency on the internet. Which, I might add, is getting worse by the day. Its, also, definitely not because I just got laid off and really need a job (see <a href="http://hire.sachimp.com/resume.html">my resume</a>). Its because its just plain <strong>bad UI design</strong>.</p>
<p>Now, don&#8217;t get me wrong. There are a lot of reasons you want link to a specific part of a document, but the way browsers implement this functionality is bad. Fortunately this is an easy fix if you use the <a href="http://flesler.blogspot.com/2007/10/jqueryscrollto.html">scrollTo jQuery plugin</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</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>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a[href^='#']&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> element <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">hash</span><span style="color: #339933;">;</span>
		e.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$.<span style="color: #660066;">scrollTo</span><span style="color: #009900;">&#40;</span>element<span style="color: #339933;">,</span> <span style="color: #CC0000;">1000</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
			offset<span style="color: #339933;">:</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">50</span><span style="color: #339933;">,</span>
			onAfter<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>
				$<span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;background&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;red&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</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: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<div class="shr-publisher-153"></div><!-- Start Shareaholic LikeButtonSetBottom --><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><div class='shareaholic-like-buttonset' style='float:none;height:30px;'><a class='shareaholic-fblike' data-shr_layout='button_count' data-shr_showfaces='false' data-shr_href='http%3A%2F%2Fsachimp.com%2F2010%2F03%2F29%2Fbad-anchors%2F' data-shr_title='Why+plain%2C+vanilla%2C+anchors+are+a+bad+idea.'></a><a class='shareaholic-googleplusone' data-shr_size='medium' data-shr_count='true' data-shr_href='http%3A%2F%2Fsachimp.com%2F2010%2F03%2F29%2Fbad-anchors%2F' data-shr_title='Why+plain%2C+vanilla%2C+anchors+are+a+bad+idea.'></a></div><div style="clear: both; min-height: 1px; height: 3px; width: 100%;"></div><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://sachimp.com/2010/03/29/bad-anchors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

