<?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: The Javascript Dollar Sign ($) Function</title>
	<atom:link href="http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/</link>
	<description>What if Gregor Samsa awoke a computer programmer?</description>
	<lastBuildDate>Tue, 24 Jan 2012 03:45:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Chris Herdt</title>
		<link>http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/comment-page-1/#comment-20653</link>
		<dc:creator>Chris Herdt</dc:creator>
		<pubDate>Thu, 20 Oct 2011 13:38:42 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=17#comment-20653</guid>
		<description>Dominik: I agree, although at this point in time the $() is well-established. There&#039;s a substantial codebase out there that uses it, so I don&#039;t think it&#039;s going anywhere soon.

Regarding jQuery, $() can also be written as jQuery(), so built-in is the option to use a more explicit function name (see &lt;a href=&quot;http://api.jquery.com/jQuery/&quot; rel=&quot;nofollow&quot;&gt;jQuery API&lt;/a&gt;). 

Prototype, on the other hand, does not seem to offer the same: &lt;a href=&quot;http://api.prototypejs.org/dom/dollar/&quot; rel=&quot;nofollow&quot;&gt;Prototype API&lt;/a&gt;. You could create your own alias (e.g. getElements = $), but that creates its own hassles.</description>
		<content:encoded><![CDATA[<p>Dominik: I agree, although at this point in time the $() is well-established. There&#8217;s a substantial codebase out there that uses it, so I don&#8217;t think it&#8217;s going anywhere soon.</p>
<p>Regarding jQuery, $() can also be written as jQuery(), so built-in is the option to use a more explicit function name (see <a href="http://api.jquery.com/jQuery/" rel="nofollow">jQuery API</a>). </p>
<p>Prototype, on the other hand, does not seem to offer the same: <a href="http://api.prototypejs.org/dom/dollar/" rel="nofollow">Prototype API</a>. You could create your own alias (e.g. getElements = $), but that creates its own hassles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dominik Kaspar</title>
		<link>http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/comment-page-1/#comment-20649</link>
		<dc:creator>Dominik Kaspar</dc:creator>
		<pubDate>Thu, 20 Oct 2011 09:13:04 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=17#comment-20649</guid>
		<description>Spelling out meaningful function names is always better than trying to prevent bytes added to your code.</description>
		<content:encoded><![CDATA[<p>Spelling out meaningful function names is always better than trying to prevent bytes added to your code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill</title>
		<link>http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/comment-page-1/#comment-20084</link>
		<dc:creator>Bill</dc:creator>
		<pubDate>Fri, 19 Aug 2011 14:54:32 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=17#comment-20084</guid>
		<description>Thanks Chris, I just started looking at JQuery and then had to find your post.  Scrontch is right - they just slapped it in there and expected me to know what they meant by it.</description>
		<content:encoded><![CDATA[<p>Thanks Chris, I just started looking at JQuery and then had to find your post.  Scrontch is right &#8211; they just slapped it in there and expected me to know what they meant by it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Herdt</title>
		<link>http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/comment-page-1/#comment-17521</link>
		<dc:creator>Chris Herdt</dc:creator>
		<pubDate>Mon, 21 Mar 2011 13:37:37 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=17#comment-17521</guid>
		<description>I can&#039;t say what exactly it means in that context without diving into the project code, but in general it is just a variable reference. In this case it is the variable reference for the argument passed to an anonymous function.</description>
		<content:encoded><![CDATA[<p>I can&#8217;t say what exactly it means in that context without diving into the project code, but in general it is just a variable reference. In this case it is the variable reference for the argument passed to an anonymous function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Pennebaker</title>
		<link>http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/comment-page-1/#comment-17440</link>
		<dc:creator>Andrew Pennebaker</dc:creator>
		<pubDate>Sat, 19 Mar 2011 22:47:56 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=17#comment-17440</guid>
		<description>Thanks for the clarification. But what does the dollar sign mean in this code?

// From TryHaskell
// https://github.com/chrisdone/tryhaskell

function ($) {
 ...
}</description>
		<content:encoded><![CDATA[<p>Thanks for the clarification. But what does the dollar sign mean in this code?</p>
<p>// From TryHaskell<br />
// <a href="https://github.com/chrisdone/tryhaskell" rel="nofollow">https://github.com/chrisdone/tryhaskell</a></p>
<p>function ($) {<br />
 &#8230;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scrontch</title>
		<link>http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/comment-page-1/#comment-15109</link>
		<dc:creator>Scrontch</dc:creator>
		<pubDate>Wed, 17 Nov 2010 17:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=17#comment-15109</guid>
		<description>Excellent. Saved me from lots of confusion and searching.
JS libraries such as JQuery take this shorthand definition for granted. So without knowing this, their tutorials and example codes become difficult to understand for the newcomer.
And thanks for putting &quot;Dollar Sign&quot; in the post title, because searching for &quot;Javascript $&quot; doesn&#039;t give any useful results ;)</description>
		<content:encoded><![CDATA[<p>Excellent. Saved me from lots of confusion and searching.<br />
JS libraries such as JQuery take this shorthand definition for granted. So without knowing this, their tutorials and example codes become difficult to understand for the newcomer.<br />
And thanks for putting &#8220;Dollar Sign&#8221; in the post title, because searching for &#8220;Javascript $&#8221; doesn&#8217;t give any useful results <img src='http://osric.com/chris/accidental-developer/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad</title>
		<link>http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/comment-page-1/#comment-14940</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Mon, 25 Oct 2010 23:38:47 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=17#comment-14940</guid>
		<description>Nice. Handy shortcut but hard to decipher without prior knowledge of it. Thanks for posting!</description>
		<content:encoded><![CDATA[<p>Nice. Handy shortcut but hard to decipher without prior knowledge of it. Thanks for posting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: walkman69</title>
		<link>http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/comment-page-1/#comment-13912</link>
		<dc:creator>walkman69</dc:creator>
		<pubDate>Tue, 22 Jun 2010 14:17:35 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=17#comment-13912</guid>
		<description>isn&#039;t the &quot;_&quot; meant to indicate that you shouldn&#039;t tamper with this thing since it&#039;s used internally?. Kind of private? ^^</description>
		<content:encoded><![CDATA[<p>isn&#8217;t the &#8220;_&#8221; meant to indicate that you shouldn&#8217;t tamper with this thing since it&#8217;s used internally?. Kind of private? ^^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: seo web design company</title>
		<link>http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/comment-page-1/#comment-4962</link>
		<dc:creator>seo web design company</dc:creator>
		<pubDate>Tue, 23 Jun 2009 23:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=17#comment-4962</guid>
		<description>I would like to point out that the JS 1.1 spec (&#039;96) states that the &#039;$&#039; and &#039;_&#039; can be used in identifiers and are valid.
url: planetpdf.com/codecuts/pdfs/tutorial/jsspec.pdf
essentially making the use of $() {} a valid function identifier. Last I recalled the ECMA Script language was developed after (and based on) Javascript by Netscape and JScript from Microsoft.</description>
		<content:encoded><![CDATA[<p>I would like to point out that the JS 1.1 spec (&#8217;96) states that the &#8216;$&#8217; and &#8216;_&#8217; can be used in identifiers and are valid.<br />
url: planetpdf.com/codecuts/pdfs/tutorial/jsspec.pdf<br />
essentially making the use of $() {} a valid function identifier. Last I recalled the ECMA Script language was developed after (and based on) Javascript by Netscape and JScript from Microsoft.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Herdt</title>
		<link>http://osric.com/chris/accidental-developer/2008/04/the-javascript-dollar-sign-function/comment-page-1/#comment-83</link>
		<dc:creator>Chris Herdt</dc:creator>
		<pubDate>Fri, 11 Jul 2008 17:36:03 +0000</pubDate>
		<guid isPermaLink="false">http://osric.com/chris/accidental-developer/?p=17#comment-83</guid>
		<description>@Phil:

It looks like that&#039;s some &lt;a href=&quot;http://jquery.com/&quot; rel=&quot;nofollow&quot;&gt;jQuery&lt;/a&gt; code. $(&#039;.print_toggle&#039;) should return all elements with the class print_toggle, and  .toggle(&#039;fast&#039;) indicates that the specified element(s) should show/hide (depending on their current state) fast (describes the animation). 

The &#039;fast&#039; argument should be superfluous, as according to the jQuery docs, toggle() doesn&#039;t take any arguments--but I notice that the transition is animated on http://www.rjobrien.com/. Maybe someone with more experience in jQuery can answer that.

http://docs.jquery.com/Selectors/class
http://docs.jquery.com/Effects/toggle

It&#039;s a pretty slick effect for very little code.</description>
		<content:encoded><![CDATA[<p>@Phil:</p>
<p>It looks like that&#8217;s some <a href="http://jquery.com/" rel="nofollow">jQuery</a> code. $(&#8216;.print_toggle&#8217;) should return all elements with the class print_toggle, and  .toggle(&#8216;fast&#8217;) indicates that the specified element(s) should show/hide (depending on their current state) fast (describes the animation). </p>
<p>The &#8216;fast&#8217; argument should be superfluous, as according to the jQuery docs, toggle() doesn&#8217;t take any arguments&#8211;but I notice that the transition is animated on <a href="http://www.rjobrien.com/" rel="nofollow">http://www.rjobrien.com/</a>. Maybe someone with more experience in jQuery can answer that.</p>
<p><a href="http://docs.jquery.com/Selectors/class" rel="nofollow">http://docs.jquery.com/Selectors/class</a><br />
<a href="http://docs.jquery.com/Effects/toggle" rel="nofollow">http://docs.jquery.com/Effects/toggle</a></p>
<p>It&#8217;s a pretty slick effect for very little code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

