Quick JavaScript CSS Theme Switching

Friday, July 20th, 2007

JavascriptIn the DOM Level 2 specifications, the disabled property is defined for <LINK> and <STYLE> elements. Toggling this property using JavaScript allows for quick CSS style switching. It’s great for switching between themes!

To illustrate, I’ve written a simple JavaScript CSS theme toggling function. It supports both external CSS stylesheet references and local STYLE declarations.

Click here to see the demo (view the source code for more information).

One Response to “Quick JavaScript CSS Theme Switching”

Can i use this code with php script…?

Comment by myadds — November 9, 2009 @ 6:22 pm

leave a reply?