<?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>indeedle &#187; JavaScript</title>
	<atom:link href="http://indeedle.com/blog/category/web/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://indeedle.com</link>
	<description>blogging the indeedle way</description>
	<lastBuildDate>Thu, 26 Aug 2010 08:16:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Why I hate hash</title>
		<link>http://indeedle.com/blog/2010/07/31/why-i-hate-hash/</link>
		<comments>http://indeedle.com/blog/2010/07/31/why-i-hate-hash/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 03:43:59 +0000</pubDate>
		<dc:creator>Cody</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://indeedle.com/blog/2010/07/31/why-i-hate-hash/</guid>
		<description><![CDATA[I lied, I don&#8217;t hate]]></description>
			<content:encoded><![CDATA[<p>I lied, I don&#8217;t hate hash. I am of course talking about the hash symbol (also known as pound or number) – #.</p>
<p>In websites the # symbol splits a URL into anchors. Everything before the # is the URL, everything after is an anchor tag. We use # to allow people to jump to specific areas on the page.</p>
<p>For example: </p>
<p>&lt;a name=&quot;topanchor&quot;&gt;Hi&lt;/a&gt;</p>
<p>&lt;a href=&quot;#topanchor&quot;&gt;Click to jump to the top&lt;/a&gt;</p>
<p>When you click the second link, your screen will jump to the first link (if this page is long enough for scrollbars).</p>
<p>But there&#8217;s one annoying place people use it. In Javascript calls on links. It&#8217;s much prettier to use # than the other method of Javascript.Void(0);</p>
<p>Except, it introduces a new problem. It&#8217;s great to have people clicking a link that activates a javascript function without actually reloading/changing the page, but if you use a # and the user is at the bottom of the page, they&#8217;ll be bounced to another section on it. Seriously. It&#8217;s a huge pain when you&#8217;re clicking a button (that&#8217;s actually a image/link) and then you&#8217;re bumped to the top of the page.</p>
<hr />
<p><small>© 2008 - 2010 for <a href="http://indeedle.com">indeedle</a>. All rights are reserved. | For more information please visit <a href="http://indeedle.com">indeedle</a>. |
<a href="http://indeedle.com/blog/2010/07/31/why-i-hate-hash/">Permalink</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://indeedle.com/blog/2010/07/31/why-i-hate-hash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LTrim, RTrim and Trim JavaScript Functions</title>
		<link>http://indeedle.com/blog/2009/12/22/ltrim-rtrim-and-trim-javascript-functions/</link>
		<comments>http://indeedle.com/blog/2009/12/22/ltrim-rtrim-and-trim-javascript-functions/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 05:30:50 +0000</pubDate>
		<dc:creator>Cody</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[javascript functions]]></category>

		<guid isPermaLink="false">http://indeedle.com/?p=36</guid>
		<description><![CDATA[These are some functions I]]></description>
			<content:encoded><![CDATA[<p>These are some functions I found online, and it drives me mad having to find them each time. I didn&#8217;t write these, but they&#8217;ve been passed around a lot. They&#8217;re useful if you need some basic JavaScript functions.</p>
<p><strong>Left Trim<br />
</strong>Pass it a string to trim and any characters that should be trimmed from the left. <strong>chars</strong> can be left empty to trim spaces.</p>
<pre class="brush: jscript;">function ltrim(str, chars) {
	chars = chars || &quot;\\s&quot;;
	return str.replace(new RegExp(&quot;^[&quot; + chars + &quot;]+&quot;, &quot;g&quot;), &quot;&quot;);
}</pre>
<p><strong>Right Trim</strong><br />
Works exactly the same as the left trim, just on the right.</p>
<pre class="brush: jscript;">function rtrim(str, chars) {
	chars = chars || &quot;\\s&quot;;
	return str.replace(new RegExp(&quot;[&quot; + chars + &quot;]+$&quot;, &quot;g&quot;), &quot;&quot;);
}</pre>
<p><strong>Trim</strong><br />
Combines the left &amp; right trim to have a full trim functions.</p>
<pre class="brush: jscript;">function trim(str, chars) {
	return ltrim(rtrim(str, chars), chars);
}</pre>
<hr />
<p><small>© 2008 - 2009 for <a href="http://indeedle.com">indeedle</a>. All rights are reserved. | For more information please visit <a href="http://indeedle.com">indeedle</a>. |
<a href="http://indeedle.com/blog/2009/12/22/ltrim-rtrim-and-trim-javascript-functions/">Permalink</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://indeedle.com/blog/2009/12/22/ltrim-rtrim-and-trim-javascript-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->