<?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: Marking a Page with &#8220;JavaScript enabled&#8221;</title>
	<atom:link href="http://www.klauskomenda.com/archives/2008/07/28/marking-a-page-with-javascript-enabled/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.klauskomenda.com/archives/2008/07/28/marking-a-page-with-javascript-enabled/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 25 Jan 2012 00:41:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Klaus</title>
		<link>http://www.klauskomenda.com/archives/2008/07/28/marking-a-page-with-javascript-enabled/comment-page-1/#comment-23205</link>
		<dc:creator>Klaus</dc:creator>
		<pubDate>Sat, 19 Sep 2009 02:38:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/?p=245#comment-23205</guid>
		<description>Another variation of this would be:

&lt;pre&gt;&lt;code&gt;document.body.className += (document.body.className !== &quot;&quot;) ? &quot; js&quot; : &quot;js&quot;;&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Another variation of this would be:</p>
<pre><code>document.body.className += (document.body.className !== "") ? " js" : "js";</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: hitch</title>
		<link>http://www.klauskomenda.com/archives/2008/07/28/marking-a-page-with-javascript-enabled/comment-page-1/#comment-9301</link>
		<dc:creator>hitch</dc:creator>
		<pubDate>Wed, 13 Aug 2008 10:11:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/?p=245#comment-9301</guid>
		<description>I think adding a class to the root element produces invalid HTML.</description>
		<content:encoded><![CDATA[<p>I think adding a class to the root element produces invalid HTML.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Lagerkvist</title>
		<link>http://www.klauskomenda.com/archives/2008/07/28/marking-a-page-with-javascript-enabled/comment-page-1/#comment-9242</link>
		<dc:creator>Andreas Lagerkvist</dc:creator>
		<pubDate>Mon, 11 Aug 2008 13:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/?p=245#comment-9242</guid>
		<description>This is a great trick but I usually start out by giving body a &quot;js-disabled&quot;-class and then replace that with &quot;js-enabled&quot;.

This way you can specifically style when JS is disabled as well as when it is enabled without using the :not() pseudo-class (body:not(.js)).</description>
		<content:encoded><![CDATA[<p>This is a great trick but I usually start out by giving body a &#8220;js-disabled&#8221;-class and then replace that with &#8220;js-enabled&#8221;.</p>
<p>This way you can specifically style when JS is disabled as well as when it is enabled without using the :not() pseudo-class (body:not(.js)).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dirk Ginader</title>
		<link>http://www.klauskomenda.com/archives/2008/07/28/marking-a-page-with-javascript-enabled/comment-page-1/#comment-8827</link>
		<dc:creator>Dirk Ginader</dc:creator>
		<pubDate>Wed, 30 Jul 2008 06:52:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/?p=245#comment-8827</guid>
		<description>Yoan&#039;s Code works. The &quot;Trick&quot; in his Case is simply to not add the Class to the Body Element but to the root Node of the Document i.e. the HTML Element. I&#039;m not too sure if this is the right place for the JS-Class but I like the execution speed of it as well as the Javascript being outside of the Body.</description>
		<content:encoded><![CDATA[<p>Yoan&#8217;s Code works. The &#8220;Trick&#8221; in his Case is simply to not add the Class to the Body Element but to the root Node of the Document i.e. the HTML Element. I&#8217;m not too sure if this is the right place for the JS-Class but I like the execution speed of it as well as the Javascript being outside of the Body.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike West</title>
		<link>http://www.klauskomenda.com/archives/2008/07/28/marking-a-page-with-javascript-enabled/comment-page-1/#comment-8801</link>
		<dc:creator>Mike West</dc:creator>
		<pubDate>Tue, 29 Jul 2008 18:26:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/?p=245#comment-8801</guid>
		<description>Yoan&#039;s right.  I just tested his code across the A-level browsers, and it works, even though the body element doesn&#039;t actually exist at the time it&#039;s executed.  I don&#039;t understand _how_ it works, but it looks like it does.  :)</description>
		<content:encoded><![CDATA[<p>Yoan&#8217;s right.  I just tested his code across the A-level browsers, and it works, even though the body element doesn&#8217;t actually exist at the time it&#8217;s executed.  I don&#8217;t understand _how_ it works, but it looks like it does.  <img src='http://www.klauskomenda.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Heilmann</title>
		<link>http://www.klauskomenda.com/archives/2008/07/28/marking-a-page-with-javascript-enabled/comment-page-1/#comment-8796</link>
		<dc:creator>Chris Heilmann</dc:creator>
		<pubDate>Tue, 29 Jul 2008 16:55:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/?p=245#comment-8796</guid>
		<description>This is a classic trick, but I am not too sure about the display:none trick. We know that display:none is not displaying things and was assume that screen readers also do not find it - however not all follow this convention. 

So in order to really make sure that things don&#039;t show up at all we should remove them from the document before replacing them with the real, fancy interface.</description>
		<content:encoded><![CDATA[<p>This is a classic trick, but I am not too sure about the display:none trick. We know that display:none is not displaying things and was assume that screen readers also do not find it &#8211; however not all follow this convention. </p>
<p>So in order to really make sure that things don&#8217;t show up at all we should remove them from the document before replacing them with the real, fancy interface.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yoan</title>
		<link>http://www.klauskomenda.com/archives/2008/07/28/marking-a-page-with-javascript-enabled/comment-page-1/#comment-8794</link>
		<dc:creator>Yoan</dc:creator>
		<pubDate>Tue, 29 Jul 2008 16:13:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.klauskomenda.com/?p=245#comment-8794</guid>
		<description>document.documentElement.className += &quot; js&quot;;

will work inside the head tag keeping the body clean. You&#039;ll have  then instead of body and it works as expected, quite well.

Cheers,</description>
		<content:encoded><![CDATA[<p>document.documentElement.className += &#8221; js&#8221;;</p>
<p>will work inside the head tag keeping the body clean. You&#8217;ll have  then instead of body and it works as expected, quite well.</p>
<p>Cheers,</p>
]]></content:encoded>
	</item>
</channel>
</rss>

