<?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>benwatts.ca &#187; anchor</title>
	<atom:link href="http://benwatts.ca/tag/anchor/feed/" rel="self" type="application/rss+xml" />
	<link>http://benwatts.ca</link>
	<description>Designer and Frontend Developer in Ottawa, Canada</description>
	<lastBuildDate>Fri, 22 Jul 2011 19:00:09 +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>Find Anchors</title>
		<link>http://benwatts.ca/2008/find-anchors/</link>
		<comments>http://benwatts.ca/2008/find-anchors/#comments</comments>
		<pubDate>Sun, 11 May 2008 17:02:27 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[anchor]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://seaturtle.rainiscold.ca/?p=23</guid>
		<description><![CDATA[Handy little function &#8230; finds an anchor and returns its text, or returns false. function findAnchor&#40;&#41;&#123; &#160; &#160; var url = document.location.toString&#40;&#41;; &#160; &#160; if&#40; url.match&#40;'#'&#41; &#41;&#123; &#160; &#160; &#160; &#160; return url.split&#40;'#'&#41;&#91;1&#93;; &#160; &#160; &#125; else &#123; &#160; &#160; &#160; &#160; return false; &#160; &#160; &#125; &#125;]]></description>
			<content:encoded><![CDATA[<p>Handy little function &#8230; finds an anchor and returns its text, or returns false.</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> findAnchor<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> document.<span style="color: #660066;">location</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> url.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> url.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://benwatts.ca/2008/find-anchors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

