<?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: Satisfy that selector!</title>
	<atom:link href="http://james.padolsey.com/javascript/satisfy-that-selector/feed/" rel="self" type="application/rss+xml" />
	<link>http://james.padolsey.com/javascript/satisfy-that-selector/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 08 Mar 2010 01:21:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: James</title>
		<link>http://james.padolsey.com/javascript/satisfy-that-selector/comment-page-1/#comment-18933</link>
		<dc:creator>James</dc:creator>
		<pubDate>Sun, 23 Aug 2009 20:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1149#comment-18933</guid>
		<description>Thanks for the comments! :)

@&lt;a href=&quot;#comment-18711&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;David&lt;/strong&gt;&lt;/a&gt;, the jQuery version was more of a POC - I only really use jQuery so I saw no need for a sans-jQuery version. But, those who ask shall receive ;) ... &lt;strong&gt;It now works with &lt;em&gt;no&lt;/em&gt; dependencies&lt;/strong&gt; - if jQuery is available it will still work as a plugin though. Check it out (same repo): http://github.com/jamespadolsey/satisfy/tree/master

@&lt;a href=&quot;#comment-18716&quot; rel=&quot;nofollow&quot;&gt;&lt;strong&gt;Pete&lt;/strong&gt;&lt;/a&gt;, that&#039;s pretty neat. I think it&#039;d take a bit of getting used to, but at a first glance it looks like a very natural way of creating elements. I&#039;m gonna have to try it out!</description>
		<content:encoded><![CDATA[<p>Thanks for the comments! <img src='http://james.padolsey.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>@<a href="#comment-18711"><strong>David</strong></a>, the jQuery version was more of a POC &#8211; I only really use jQuery so I saw no need for a sans-jQuery version. But, those who ask shall receive <img src='http://james.padolsey.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  &#8230; <strong>It now works with <em>no</em> dependencies</strong> &#8211; if jQuery is available it will still work as a plugin though. Check it out (same repo): <a href="http://github.com/jamespadolsey/satisfy/tree/master">http://github.com/jamespadolsey/satisfy/tree/master</a></p>
<p>@<a href="#comment-18716"><strong>Pete</strong></a>, that&#8217;s pretty neat. I think it&#8217;d take a bit of getting used to, but at a first glance it looks like a very natural way of creating elements. I&#8217;m gonna have to try it out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Sharp</title>
		<link>http://james.padolsey.com/javascript/satisfy-that-selector/comment-page-1/#comment-18785</link>
		<dc:creator>Jonathan Sharp</dc:creator>
		<pubDate>Fri, 21 Aug 2009 17:22:41 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1149#comment-18785</guid>
		<description>James, that absolutely rocks! Clean implementation too!</description>
		<content:encoded><![CDATA[<p>James, that absolutely rocks! Clean implementation too!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://james.padolsey.com/javascript/satisfy-that-selector/comment-page-1/#comment-18716</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Thu, 20 Aug 2009 19:52:34 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1149#comment-18716</guid>
		<description>I&#039;ve been using &lt;a href=&quot;http://code.google.com/p/jelly-javascript/source/browse/trunk/src/core/elements.js#45&quot; rel=&quot;nofollow&quot;&gt;something like this&lt;/a&gt; for a while (not written for jQuery though). It&#039;s definitely the way to go, sort of a natural partner to querySelectorAll.

My version is slightly influenced by HAML, with divs as a default element type:

&lt;pre lang=&quot;javascript&quot;&gt;
createElement( &#039;#container&#039; );
// div id=&quot;container&quot; 

createElement( &#039;span.wrapper&#039; );
// span class=&quot;wrapper&quot; 

createElement( &#039;img src:path/here/img.png, alt:&quot;this is art&quot;&#039; );
// img src=&quot;path/here/img.png&quot; alt=&quot;this is art&quot; 
&lt;/pre&gt;

And also as branch builder, that returns an object of references: 

&lt;pre lang=&quot;javascript&quot;&gt;
createBranch(
  &#039;#container&#039;,
    &#039;#container-inner&#039;,
      [
       &#039;h1 setText: &quot;Hello world&quot;&#039;,
       &#039;p @:myPara, setHTML: &quot;Blah&quot;&#039;
      ]	
  );
/*
{
  root: #container,
  div: [#container, #container-inner],
  h1: [h1],
  p: [p],
  myPara: p
}
*/
&lt;/pre&gt;

For complicated structures you can also nest branches without compromising the returned object.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://code.google.com/p/jelly-javascript/source/browse/trunk/src/core/elements.js#45">something like this</a> for a while (not written for jQuery though). It&#8217;s definitely the way to go, sort of a natural partner to querySelectorAll.</p>
<p>My version is slightly influenced by HAML, with divs as a default element type:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">createElement<span class="br0">&#40;</span> <span class="st0">'#container'</span> <span class="br0">&#41;</span><span class="sy0">;</span>
<span class="co1">// div id=&quot;container&quot; </span>
&nbsp;
createElement<span class="br0">&#40;</span> <span class="st0">'span.wrapper'</span> <span class="br0">&#41;</span><span class="sy0">;</span>
<span class="co1">// span class=&quot;wrapper&quot; </span>
&nbsp;
createElement<span class="br0">&#40;</span> <span class="st0">'img src:path/here/img.png, alt:&quot;this is art&quot;'</span> <span class="br0">&#41;</span><span class="sy0">;</span>
<span class="co1">// img src=&quot;path/here/img.png&quot; alt=&quot;this is art&quot;</span></pre></div></div>

<p>And also as branch builder, that returns an object of references:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">createBranch<span class="br0">&#40;</span>
  <span class="st0">'#container'</span><span class="sy0">,</span>
    <span class="st0">'#container-inner'</span><span class="sy0">,</span>
      <span class="br0">&#91;</span>
       <span class="st0">'h1 setText: &quot;Hello world&quot;'</span><span class="sy0">,</span>
       <span class="st0">'p @:myPara, setHTML: &quot;Blah&quot;'</span>
      <span class="br0">&#93;</span>	
  <span class="br0">&#41;</span><span class="sy0">;</span>
<span class="coMULTI">/*
{
  root: #container,
  div: [#container, #container-inner],
  h1: [h1],
  p: [p],
  myPara: p
}
*/</span></pre></div></div>

<p>For complicated structures you can also nest branches without compromising the returned object.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Walsh</title>
		<link>http://james.padolsey.com/javascript/satisfy-that-selector/comment-page-1/#comment-18711</link>
		<dc:creator>David Walsh</dc:creator>
		<pubDate>Thu, 20 Aug 2009 19:20:43 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1149#comment-18711</guid>
		<description>Awesome work James -- this looks very useful.  Do you think a non-jQuery-specific version could be in order?  This would have a much larger audience if it was coded with vanilla javascript.</description>
		<content:encoded><![CDATA[<p>Awesome work James &#8212; this looks very useful.  Do you think a non-jQuery-specific version could be in order?  This would have a much larger audience if it was coded with vanilla javascript.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Irish</title>
		<link>http://james.padolsey.com/javascript/satisfy-that-selector/comment-page-1/#comment-18707</link>
		<dc:creator>Paul Irish</dc:creator>
		<pubDate>Thu, 20 Aug 2009 18:16:43 +0000</pubDate>
		<guid isPermaLink="false">http://james.padolsey.com/?p=1149#comment-18707</guid>
		<description>Yeah this is pretty damn perfect for quickly writing some markup to test on. Thanks man.</description>
		<content:encoded><![CDATA[<p>Yeah this is pretty damn perfect for quickly writing some markup to test on. Thanks man.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
