<?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"
	>
<channel>
	<title>Comments on: DOM JavaScript Cheat Sheet</title>
	<atom:link href="http://www.wait-till-i.com/2007/06/27/dom-javascript-cheat-sheet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wait-till-i.com/2007/06/27/dom-javascript-cheat-sheet/</link>
	<description>Chris Heilmann - Accessibility, Web Development and Pragmatism - can talk, will travel</description>
	<pubDate>Thu, 28 Aug 2008 00:37:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: E</title>
		<link>http://www.wait-till-i.com/2007/06/27/dom-javascript-cheat-sheet/#comment-8070</link>
		<dc:creator>E</dc:creator>
		<pubDate>Tue, 22 Jul 2008 17:36:20 +0000</pubDate>
		<guid isPermaLink="false">#comment-8070</guid>
		<description>Thanks for posting this. Just what I was looking for.</description>
		<content:encoded><![CDATA[<p>Thanks for posting this. Just what I was looking for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Hedges</title>
		<link>http://www.wait-till-i.com/2007/06/27/dom-javascript-cheat-sheet/#comment-7925</link>
		<dc:creator>Andrew Hedges</dc:creator>
		<pubDate>Thu, 26 Jun 2008 01:56:06 +0000</pubDate>
		<guid isPermaLink="false">#comment-7925</guid>
		<description>@trevor, Using [set/get]Attribute makes your code look a lot like Java, which it's not. It's JavaScript, so use the features of the language that make it expressive and clean, like direct assignment to properties.</description>
		<content:encoded><![CDATA[<p>@trevor, Using [set/get]Attribute makes your code look a lot like Java, which it&#8217;s not. It&#8217;s JavaScript, so use the features of the language that make it expressive and clean, like direct assignment to properties.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://www.wait-till-i.com/2007/06/27/dom-javascript-cheat-sheet/#comment-4993</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Fri, 06 Jul 2007 16:59:59 +0000</pubDate>
		<guid isPermaLink="false">#comment-4993</guid>
		<description>Thanks for this Chris. I found it useful. An idea for an enhancement...you can put some simple functions on the back/2nd page...</description>
		<content:encoded><![CDATA[<p>Thanks for this Chris. I found it useful. An idea for an enhancement&#8230;you can put some simple functions on the back/2nd page&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Heilmann</title>
		<link>http://www.wait-till-i.com/2007/06/27/dom-javascript-cheat-sheet/#comment-4946</link>
		<dc:creator>Chris Heilmann</dc:creator>
		<pubDate>Thu, 28 Jun 2007 17:57:31 +0000</pubDate>
		<guid isPermaLink="false">#comment-4946</guid>
		<description>goetsu: I use this
&lt;pre&gt;&lt;code&gt;
function cleanChildNodes(id){
  // get the element with the id provided
  var x = document.getElementById(id);
  // test if the element exists
  if(x){
    // regular Expression testing if a string is only whitespace
    var reg = /s*/mg;
    // loop over all childNodes of the element
    for(var i=0;x.childNodes[i];i++){
      // if the current item only consists of whitespace...
      var current = x.childNodes[i];
      if(reg.test(current.nodeValue)){
      // ... remove it
        current.parentNode.removeChild(current);
      }
      // there is no need to check for the node type
      // as element nodes have a nodeValue of null
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>goetsu: I use this</p>
<pre><code>
function cleanChildNodes(id){
  // get the element with the id provided
  var x = document.getElementById(id);
  // test if the element exists
  if(x){
    // regular Expression testing if a string is only whitespace
    var reg = /s*/mg;
    // loop over all childNodes of the element
    for(var i=0;x.childNodes[i];i++){
      // if the current item only consists of whitespace&#8230;
      var current = x.childNodes[i];
      if(reg.test(current.nodeValue)){
      // &#8230; remove it
        current.parentNode.removeChild(current);
      }
      // there is no need to check for the node type
      // as element nodes have a nodeValue of null
    }
  }
}
</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: goetsu</title>
		<link>http://www.wait-till-i.com/2007/06/27/dom-javascript-cheat-sheet/#comment-4943</link>
		<dc:creator>goetsu</dc:creator>
		<pubDate>Thu, 28 Jun 2007 08:38:47 +0000</pubDate>
		<guid isPermaLink="false">#comment-4943</guid>
		<description>I have question about this :
Real DOM compliant browsers will return linebreaks as text nodes in the childNodes collection, make sure to either remove them. 

Is there an easy way to do that with a DOM method, i am looking how to do it with jquery too and YUI too</description>
		<content:encoded><![CDATA[<p>I have question about this :<br />
Real <span class="caps">DOM </span>compliant browsers will return linebreaks as text nodes in the childNodes collection, make sure to either remove them. </p>
<p>Is there an easy way to do that with a <span class="caps">DOM </span>method, i am looking how to do it with jquery too and <span class="caps">YUI </span>too</p>
]]></content:encoded>
	</item>
</channel>
</rss>
