<?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>BarelyBlogging &#187; Tabs</title>
	<atom:link href="http://www.barelyfitz.com/blog/archives/category/tabs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.barelyfitz.com/blog</link>
	<description>Patrick Fitzgerald of BarelyFitz Designs</description>
	<lastBuildDate>Thu, 13 Oct 2011 01:55:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Eliminating redisplay flashes in JavaScript</title>
		<link>http://www.barelyfitz.com/blog/archives/2006/03/09/232/</link>
		<comments>http://www.barelyfitz.com/blog/archives/2006/03/09/232/#comments</comments>
		<pubDate>Thu, 09 Mar 2006 14:53:27 +0000</pubDate>
		<dc:creator>pat</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[DHTML]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[Tabs]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[tabber]]></category>

		<guid isPermaLink="false">http://www.barelyfitz.com/blog/archives/2006/03/09/232/</guid>
		<description><![CDATA[The Holy Grail in creating dynamic HTML is to have a page that works perfectly even when JavaScript is disabled. You want your page to be beautiful and dynamic, but you also want it to be accessible, search-engine optimized, and printable.
To make this happen you start with plain, semantic HTML, then you add a JavaScript [...]]]></description>
			<content:encoded><![CDATA[<p>The Holy Grail in creating dynamic HTML is to have a page that works perfectly even when JavaScript is disabled. You want your page to be beautiful and dynamic, but you also want it to be accessible, search-engine optimized, and printable.</p>
<p>To make this happen you start with plain, semantic HTML, then you add a JavaScript layer to rework the page into something better:</p>
<p><img alt="JavaScript vs. No JavaScript" src="http://www.barelyfitz.com/blog/upload/js-vs-no-js.gif" /></p>
<p>One problem with this technique is that your JavaScript must run <em>after</em> the HTML has been set up and rendered on the page, so a user with a slow connection might see something like this using my <a href="http://www.barelyfitz.com/projects/tabber/">JavaScript tabbifier</a>:</p>
<p><img alt="Animated simulation of HTML rendered then re-rendering using JavaScript" src="http://www.barelyfitz.com/blog/upload/flashing-anim.gif" /></p>
<p>This is not too pretty, so obviously we want to make it stop.</p>
<p>Your first thought might be &#8220;I&#8217;ll just add a style to the content to make it hidden (CSS display:none), then my JavaScript will run and reveal it!&#8221;  But that puts a big crack in our Holy Grail, because if you use CSS to hide the content, it will not be visible to users who do not have JavaScript.</p>
<p>Here&#8217;s the method I used:</p>
<ol>
<li>Add a class <em>javascript-hide-me</em> to the content you need to hide, but do not define that class in your CSS.</li>
<li><em>Before</em> the content, use JavaScript to define the CSS class. The easiest way to do this is by using document.write in the head section of the page, but you will have to directly modify the DOM if you are serving XHTML pages that use MIME type application/xhtml+xml.</li>
<li><em>After</em> the content has been transformed, use JavaScript to remove the CSS class and reveal the content.</li>
</ol>
<p>Here are two examples, one that exhibits the flashing problem, and another that fixes it using the technique described above. Note that in order to see the flashing problem, you need a slow internet connection: I recommend throttling your connection using the excellent <a href="http://www.xk72.com/charles/">Charles Web Debugging Proxy</a>.</p>
<ul>
<li><a href="http://www.barelyfitz.com/projects/flashing-javascript/flashing.html">flashing</a></li>
<li><a href="http://www.barelyfitz.com/projects/flashing-javascript/no-flashing.html">flashing fixed</a></li>
</ul>
<h3>Updates 2006-03-09</h3>
<p>Welcome, <a href="http://ajaxian.com/archives/eliminating-redisplay-flashes-in-javascript">Ajaxians</a>!</p>
<p>Bobby <a href="http://www.bobbyvandersluis.com/articles/dynamicCSS.php">describes</a> an alternate technique in case you are serving XHTML pages that use MIME type application/xhtml+xml.</p>
<p><a href="http://mrclay.org/">Steve Clay</a> makes a valid point that we should check for DOM compatibility before writing the styles on the page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barelyfitz.com/blog/archives/2006/03/09/232/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>JavaScript tabifier</title>
		<link>http://www.barelyfitz.com/blog/archives/2006/03/02/227/</link>
		<comments>http://www.barelyfitz.com/blog/archives/2006/03/02/227/#comments</comments>
		<pubDate>Thu, 02 Mar 2006 16:50:26 +0000</pubDate>
		<dc:creator>pat</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tabs]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[tabber]]></category>

		<guid isPermaLink="false">http://www.barelyfitz.com/blog/archives/2006/03/02/227/</guid>
		<description><![CDATA[Damn, was I beaten to the punch?
A while back I was working on an automated tabifier using JavaScript, then this popped up today in the popular page in deli.icio.us: Link
I shouldn&#8217;t post unfinished code, but damn it, I think mine is better!  
My tabs are completely CSS controlled, they look great without JavaScript and [...]]]></description>
			<content:encoded><![CDATA[<p>Damn, was I beaten to the punch?</p>
<p>A while back I was working on an automated tabifier using JavaScript, then this popped up today in the popular page in deli.icio.us: <a rel="nofollow" href="http://blog.livedoor.jp/dankogai/archives/50397330.html">Link</a></p>
<p>I shouldn&#8217;t post unfinished code, but damn it, I think mine is better! <img src='http://www.barelyfitz.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>My tabs are completely CSS controlled, they look great without JavaScript and the page always prints (I think a lot of DHTML developers do not take into effect that a page will be printed).</p>
<p>Anyway, check it out here: <a href="http://www.barelyfitz.com/projects/tabber/">JavaScript tabifier</a></p>
<p>If you like it please contact me &#8211; with enough encouragement I might continue this project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.barelyfitz.com/blog/archives/2006/03/02/227/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

