<?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>FND's Blag &#187; jQuery</title>
	<atom:link href="http://fnd.lewcid.org/blog/archive/tag/jquery/feed" rel="self" type="application/rss+xml" />
	<link>http://fnd.lewcid.org/blog</link>
	<description>Just Another Personal Wobsite</description>
	<lastBuildDate>Mon, 23 Aug 2010 05:54: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>jQuery API Documentation in TiddlyWiki</title>
		<link>http://fnd.lewcid.org/blog/archive/143</link>
		<comments>http://fnd.lewcid.org/blog/archive/143#comments</comments>
		<pubDate>Sun, 14 Feb 2010 09:05:43 +0000</pubDate>
		<dc:creator>FND</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[TiddlyWiki]]></category>

		<guid isPermaLink="false">http://fnd.lewcid.org/blog/?p=143</guid>
		<description><![CDATA[The jQuery folks are nice enough to provide a raw XML dump of their API documentation (http://api.jquery.com). I wrote a quick macro to parse that data and store it as tiddlers: http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/jQueryDocsImportMacro.js Demo: http://fnd.lewcid.org/tmp/jQueryAPI.html http://groups.google.com/group/tiddlywikidev/browse_thread/thread/4974fa9717f669ab]]></description>
			<content:encoded><![CDATA[<blockquote><p>
The jQuery folks are nice enough to provide a raw XML dump of their API documentation (<a href="http://api.jquery.com">http://api.jquery.com</a>).<br />
I wrote a quick macro to parse that data and store it as tiddlers:<br />
<span id="more-143"></span><a href="http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/jQueryDocsImportMacro.js">http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/jQueryDocsImportMacro.js</a><br />
Demo:<br />
<a href="http://fnd.lewcid.org/tmp/jQueryAPI.html">http://fnd.lewcid.org/tmp/jQueryAPI.html</a>
</p></blockquote>
<p><a href="http://groups.google.com/group/tiddlywikidev/browse_thread/thread/4974fa9717f669ab">http://groups.google.com/group/tiddlywikidev/browse_thread/thread/4974fa9717f669ab</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fnd.lewcid.org/blog/archive/143/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery Idioms For Element Generation</title>
		<link>http://fnd.lewcid.org/blog/archive/109</link>
		<comments>http://fnd.lewcid.org/blog/archive/109#comments</comments>
		<pubDate>Sat, 15 Aug 2009 12:31:41 +0000</pubDate>
		<dc:creator>FND</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://fnd.lewcid.org/blog/?p=109</guid>
		<description><![CDATA[While working on some jQuery-based applications for TiddlyWeb (post upcoming), I noticed there was no obvious concise way to chain the creation of multiple nested elements. Over the course of several discussions with Mike, we&#8217;ve come up with some simple idioms which we hope will make our code a little prettier: var entries = ["foo", [...]]]></description>
			<content:encoded><![CDATA[<p>While working on some <a href="http://jquery.com">jQuery</a>-based applications for <a href="http://tiddlyweb.com">TiddlyWeb</a> (post upcoming), I noticed there was no obvious concise way to chain the creation of multiple nested elements.</p>
<p>Over the course of several discussions with <a href="http://softwareas.com">Mike</a>, we&#8217;ve come up with some simple idioms which we hope will make our code a little prettier:<br />
<span id="more-109"></span></p>
<pre>
var entries = ["foo", "bar", "baz"];

$("&lt;ul /&gt;").
	append($.map(entries, function(item, i) {
		return $("&lt;li /&gt;").text(item)[0];
	})).
	appendTo(container);
</pre>
<pre style="margin-top: 10px">
$.fn.create = function(html) {
	return this.append(html).children(":last");
};

$("&lt;div /&gt;").
	create("&lt;h2 /&gt;").addClass(className).text(heading).end().
	create("&lt;p /&gt;").text(body).end().
	appendTo(container);
</pre>
<p>I&#8217;ve created a simple <a href="http://fnd.lewcid.org/misc/jQuery_idioms.html">demo page</a> (<a href="http://github.com/FND/jquery">source</a>) to better illustrate and explain this new approach, contrasting it with my previous code.</p>
<p>While I&#8217;m sure this sort of thing has been done before, it doesn&#8217;t seem to be common knowledge &mdash; at least nobody in the <a href="irc://irc.freenode.net/jQuery">jQuery IRC channel</a> had any ideas when I first asked.</p>
<p>Any comments (including <a href="http://www.urbandictionary.com/define.php?term=ydiw" title="you're doing it completely wrong">YDICW</a>, if necessary) would be appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://fnd.lewcid.org/blog/archive/109/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
