In college, we’ve just begun to start looking at using jQuery (a rather nice, cross-browser compatible JavaScript library), and I’ve found a rather good style switcher script (and managed to implement it on my localhost). My question is this:
Would you rather I switch over to this JavaScript powered one, or keep the PHP powered one I have now?
Obviously, being implemented in two completely different ways, there are advantages and disadvantages of switching. Firstly, what with JavaScript being client-side, the style switcher will work much faster, without the need to reload the page at all.
However, I know people often browse the web with JavaScript disabled, which would render the script completely unusable. I don’t know how many of my visitors have JavaScript disabled, so I don’t know how many people I would be excluding if I were to use the JavaScript one.
So, any thought/opinions about this? Which one would you prefer to see?
Vasili Says:
I prefer the PHP powered switcher because I browse with JavaScript disabled. I just have to say this…
I love jQuery.
Nat Marie Says:
Would it conflict if you used both? Is it possible to only load the jQuery script for those who have Javascript enabled?
It makes no difference to me, because I have Javascript enabled.
Joe Says:
@Nat: I could probably try using the <noscript> tag for people with JavaScript disabled, but I’m not sure if that would invalidate my XHTML or not, and I think the PHP code would still parse inside the <noscript>
I’ll have a play around.
Jem Says:
I also browse with JavaScript turned off, so I’d prefer the PHP one to be kept… but it would hardly be a stretch to whitelist your site in NoScript
Gary Says:
Gars knows how much Joe Joe likes his PHP, so Joe Joe should stick mit it.
Kaylee Says:
It makes no difference to me
But I would stick with the PHP just because it would probably be accessible for more visitors than JavaScript.
Brian Says:
I don’t really care. Although, reading through some of the comments, some people do. So… in my opinion, it’s up to you.


