<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Javascript get window hash/anchor, get link target</title>
	<atom:link href="http://stereointeractive.com/blog/2008/11/21/javascript-get-window-hashanchor-get-link-target/feed/" rel="self" type="application/rss+xml" />
	<link>http://stereointeractive.com/blog/2008/11/21/javascript-get-window-hashanchor-get-link-target/</link>
	<description>Development Blog</description>
	<lastBuildDate>Thu, 17 Jun 2010 09:37:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mani Tadayon</title>
		<link>http://stereointeractive.com/blog/2008/11/21/javascript-get-window-hashanchor-get-link-target/comment-page-1/#comment-360</link>
		<dc:creator>Mani Tadayon</dc:creator>
		<pubDate>Tue, 06 Jan 2009 01:39:44 +0000</pubDate>
		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=95#comment-360</guid>
		<description>Nice work. Sometimes I use question marks after my hash to specify actions:

http://a.com#favorites?recent


So this code is a useful extension of your function (useful to me at least!):

&lt;code&gt;
function getHash(excludeQuestionMark) {
	if (typeof excludeQuestionMark == &#039;undefined&#039;) var excludeQuestionMark = true;
	var hash = window.location.hash;
	var stop = hash.indexOf(&#039;?&#039;);
	// if there was no question mark in the hash, or if excludeQuestionMark is set to false
	if (stop == -1 &#124;&#124; !excludeQuestionMark)
	 	var returner = hash.substring(1); // remove #
	else
	 	var returner = hash.substring(1,stop); // remove # and exlude everything after &#039;?&#039;
	return returner;
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Nice work. Sometimes I use question marks after my hash to specify actions:</p>
<p><a href="http://a.com#favorites?recent" rel="nofollow">http://a.com#favorites?recent</a></p>
<p>So this code is a useful extension of your function (useful to me at least!):</p>
<p><code><br />
function getHash(excludeQuestionMark) {<br />
	if (typeof excludeQuestionMark == 'undefined') var excludeQuestionMark = true;<br />
	var hash = window.location.hash;<br />
	var stop = hash.indexOf('?');<br />
	// if there was no question mark in the hash, or if excludeQuestionMark is set to false<br />
	if (stop == -1 || !excludeQuestionMark)<br />
	 	var returner = hash.substring(1); // remove #<br />
	else<br />
	 	var returner = hash.substring(1,stop); // remove # and exlude everything after '?'<br />
	return returner;<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Williams</title>
		<link>http://stereointeractive.com/blog/2008/11/21/javascript-get-window-hashanchor-get-link-target/comment-page-1/#comment-333</link>
		<dc:creator>Jon Williams</dc:creator>
		<pubDate>Fri, 21 Nov 2008 23:42:49 +0000</pubDate>
		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=95#comment-333</guid>
		<description>I&#039;d use a regexp for the second, but those are very useful.</description>
		<content:encoded><![CDATA[<p>I&#8217;d use a regexp for the second, but those are very useful.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
