<?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: jQuery styleswitch &#8211; now with toggle!</title>
	<atom:link href="http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/</link>
	<description>a stroke of luck</description>
	<lastBuildDate>Thu, 02 Feb 2012 07:32:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Tina C.</title>
		<link>http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/comment-page-2/#comment-97684</link>
		<dc:creator>Tina C.</dc:creator>
		<pubDate>Tue, 17 Jan 2012 14:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.kelvinluck.com/?p=794#comment-97684</guid>
		<description>@Trend:

My understanding is that it&#039;s a confirmed bug with Safari 5.1 that will (hopefully) be corrected in a future release.  You can read all the dirty details on Apple&#039;s discussion forums (link below), including some workarounds.  

https://discussions.apple.com/thread/3215084?start=15&amp;tstart=0</description>
		<content:encoded><![CDATA[<p>@Trend:</p>
<p>My understanding is that it's a confirmed bug with Safari 5.1 that will (hopefully) be corrected in a future release.  You can read all the dirty details on Apple's discussion forums (link below), including some workarounds.  </p>
<p><a href="https://discussions.apple.com/thread/3215084?start=15&#038;tstart=0" rel="nofollow">https://discussions.apple.com/thread/3215084?start=15&#038;tstart=0</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trend</title>
		<link>http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/comment-page-2/#comment-86469</link>
		<dc:creator>Trend</dc:creator>
		<pubDate>Sat, 03 Dec 2011 18:43:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.kelvinluck.com/?p=794#comment-86469</guid>
		<description>Hi,

I have been using the stylesheet switcher for years. Thank you.

I just upgraded to Safari 5.1. The switcher no longer works. When I click the link to switch stylesheets all styles are removed. I can switch back to the original style and restore formatting. The functionality still works fine on other browsers. I can&#039;t figure out what exactly is wrong. Safari 5.1 seemed to change how cookies are handled. I &#039;m not sure if that is the problem.

Do you have a fix?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have been using the stylesheet switcher for years. Thank you.</p>
<p>I just upgraded to Safari 5.1. The switcher no longer works. When I click the link to switch stylesheets all styles are removed. I can switch back to the original style and restore formatting. The functionality still works fine on other browsers. I can't figure out what exactly is wrong. Safari 5.1 seemed to change how cookies are handled. I 'm not sure if that is the problem.</p>
<p>Do you have a fix?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pierre</title>
		<link>http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/comment-page-2/#comment-84689</link>
		<dc:creator>Pierre</dc:creator>
		<pubDate>Wed, 23 Nov 2011 08:07:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.kelvinluck.com/?p=794#comment-84689</guid>
		<description>Doesn&#039;t work in Safari latest, is there a fix to this?</description>
		<content:encoded><![CDATA[<p>Doesn't work in Safari latest, is there a fix to this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RyanG</title>
		<link>http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/comment-page-2/#comment-78074</link>
		<dc:creator>RyanG</dc:creator>
		<pubDate>Thu, 06 Oct 2011 17:03:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.kelvinluck.com/?p=794#comment-78074</guid>
		<description>My goal is to have a site that uses a different background image for each hour of the day. So, I would like a different stylesheet to load when a page is visited depending on the time of day (so, no &quot;toggle&quot; button for users to click). Do you think this is possible with this code?

Thanks.</description>
		<content:encoded><![CDATA[<p>My goal is to have a site that uses a different background image for each hour of the day. So, I would like a different stylesheet to load when a page is visited depending on the time of day (so, no "toggle" button for users to click). Do you think this is possible with this code?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ctoz</title>
		<link>http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/comment-page-2/#comment-75159</link>
		<dc:creator>ctoz</dc:creator>
		<pubDate>Fri, 02 Sep 2011 02:33:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.kelvinluck.com/?p=794#comment-75159</guid>
		<description>Safari 5.0 problem persists. 

Checking around, Safari 5.0 seems ok in

http://comp345.awardspace.com/sheetswitch/index.html

...so there might be a clue there to fixing *this* really nice switcher ?</description>
		<content:encoded><![CDATA[<p>Safari 5.0 problem persists. </p>
<p>Checking around, Safari 5.0 seems ok in</p>
<p><a href="http://comp345.awardspace.com/sheetswitch/index.html" rel="nofollow">http://comp345.awardspace.com/sheetswitch/index.html</a></p>
<p>...so there might be a clue there to fixing *this* really nice switcher ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sander</title>
		<link>http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/comment-page-2/#comment-74900</link>
		<dc:creator>Sander</dc:creator>
		<pubDate>Tue, 30 Aug 2011 13:20:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.kelvinluck.com/?p=794#comment-74900</guid>
		<description>We use the script and confirm the Safari 5.1 Mac OS X problems. Please let us know if a fix is possible...</description>
		<content:encoded><![CDATA[<p>We use the script and confirm the Safari 5.1 Mac OS X problems. Please let us know if a fix is possible...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anders</title>
		<link>http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/comment-page-2/#comment-71775</link>
		<dc:creator>Anders</dc:creator>
		<pubDate>Fri, 29 Jul 2011 10:28:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.kelvinluck.com/?p=794#comment-71775</guid>
		<description>I can confirm the problem with Safari 5.1.in Mac OS X.

I also tested latest Google Chrome 12.0.742.122 and it is still working.</description>
		<content:encoded><![CDATA[<p>I can confirm the problem with Safari 5.1.in Mac OS X.</p>
<p>I also tested latest Google Chrome 12.0.742.122 and it is still working.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/comment-page-2/#comment-71725</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 28 Jul 2011 22:41:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.kelvinluck.com/?p=794#comment-71725</guid>
		<description>Hi,

I have been using the stylesheet switcher for years. Thank you. 

I just upgraded to Safari 5.1. The switcher no longer works. When I click the link to switch stylesheets all styles are removed. I can switch back to the original style and restore formatting. The functionality still works fine on other browsers. I can&#039;t figure out what exactly is wrong. Safari 5.1 seemed to change how cookies are handled. I &#039;m not sure if that is the problem.

Do you have a fix?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have been using the stylesheet switcher for years. Thank you. </p>
<p>I just upgraded to Safari 5.1. The switcher no longer works. When I click the link to switch stylesheets all styles are removed. I can switch back to the original style and restore formatting. The functionality still works fine on other browsers. I can't figure out what exactly is wrong. Safari 5.1 seemed to change how cookies are handled. I 'm not sure if that is the problem.</p>
<p>Do you have a fix?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: web-creativite</title>
		<link>http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/comment-page-2/#comment-65798</link>
		<dc:creator>web-creativite</dc:creator>
		<pubDate>Thu, 19 May 2011 13:09:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.kelvinluck.com/?p=794#comment-65798</guid>
		<description>The cookie function works for Chrome as well once you&#039;ve uploaded it!</description>
		<content:encoded><![CDATA[<p>The cookie function works for Chrome as well once you've uploaded it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roberto Cobetti</title>
		<link>http://www.kelvinluck.com/2009/07/jquery-styleswitch-now-with-toggle/comment-page-2/#comment-65711</link>
		<dc:creator>Roberto Cobetti</dc:creator>
		<pubDate>Wed, 18 May 2011 08:40:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.kelvinluck.com/?p=794#comment-65711</guid>
		<description>Well done Kelvin !
My attempt was far way complicated, so now I&#039;m using yours. I modified the code (just one line...) to always keep in memory one default stylesheet. I have a &quot;standard&quot; style that always applies to pages and alternate styles just change some of the classes. So I have the default style that counts about 150 lines, while the 5 alternate stylesheets count less than 30 lines each. My problem was that switching completely the &quot;standard&quot; with the first or the second alternate stylesheet I was loosing also the common part that I wanted to keep. To achieve the result I just added an ID attribute to the link tag in the head of my page, something like this:






In this way I can avoid to disable the &quot;default&quot; stylesheet and keep it always alive. I just changed


$(&#039;link[@rel*=style][title]&#039;).each(function(i){
    this.disabled = true;
    ...


to this


$(&#039;link[@rel*=style][title]&#039;).each(function(i){
    if (this.getAttribute(&#039;id&#039;) != &quot;default&quot;){ this.disabled = true; }
   ....


Hope this helps someone else.</description>
		<content:encoded><![CDATA[<p>Well done Kelvin !<br />
My attempt was far way complicated, so now I'm using yours. I modified the code (just one line...) to always keep in memory one default stylesheet. I have a "standard" style that always applies to pages and alternate styles just change some of the classes. So I have the default style that counts about 150 lines, while the 5 alternate stylesheets count less than 30 lines each. My problem was that switching completely the "standard" with the first or the second alternate stylesheet I was loosing also the common part that I wanted to keep. To achieve the result I just added an ID attribute to the link tag in the head of my page, something like this:</p>
<p>In this way I can avoid to disable the "default" stylesheet and keep it always alive. I just changed</p>
<p>$('link[@rel*=style][title]').each(function(i){<br />
    this.disabled = true;<br />
    ...</p>
<p>to this</p>
<p>$('link[@rel*=style][title]').each(function(i){<br />
    if (this.getAttribute('id') != "default"){ this.disabled = true; }<br />
   ....</p>
<p>Hope this helps someone else.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.364 seconds -->

