<?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: SwitchView Plugin Released</title>
	<atom:link href="http://jqueryminute.com/switchview-plugin-released/feed/" rel="self" type="application/rss+xml" />
	<link>http://jqueryminute.com/switchview-plugin-released/</link>
	<description>...a jQuery Minute™ later and you&#039;re done!</description>
	<lastBuildDate>Fri, 09 Apr 2010 22:13:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Paul Irish</title>
		<link>http://jqueryminute.com/switchview-plugin-released/comment-page-1/#comment-391</link>
		<dc:creator>Paul Irish</dc:creator>
		<pubDate>Tue, 24 Nov 2009 23:03:50 +0000</pubDate>
		<guid isPermaLink="false">http://jqueryminute.com/?p=85#comment-391</guid>
		<description>When I&#039;m doing something like this I really like to use classNames to reflect my current state.

So my approach would be something like:

$(&#039;body&#039;).toggleClass(&#039;changePw&#039;);

and then in my css:

.view-on-change-pw {display:none;}
.changePw .view-on-change-pw { display:block; }

I oftentimes pass a boolean to toggleClass in these instances, as I know what direction I want things to go in. 

(The obvious downside is that I need to specify the display value of the elements, but I&#039;m typically using this on &#039;block&#039; containers anyhow.)

But I like 1) having the DOM represent current state 2) keeping separation of presentation and behavior and 3) it&#039;s super fast.</description>
		<content:encoded><![CDATA[<p>When I&#8217;m doing something like this I really like to use classNames to reflect my current state.</p>
<p>So my approach would be something like:</p>
<p>$(&#8216;body&#8217;).toggleClass(&#8216;changePw&#8217;);</p>
<p>and then in my css:</p>
<p>.view-on-change-pw {display:none;}<br />
.changePw .view-on-change-pw { display:block; }</p>
<p>I oftentimes pass a boolean to toggleClass in these instances, as I know what direction I want things to go in. </p>
<p>(The obvious downside is that I need to specify the display value of the elements, but I&#8217;m typically using this on &#8216;block&#8217; containers anyhow.)</p>
<p>But I like 1) having the DOM represent current state 2) keeping separation of presentation and behavior and 3) it&#8217;s super fast.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
