King Antonius Posted November 15, 2007 Share Posted November 15, 2007 Hows it done? basically im busy creating a website for uni and for future use aswell, basically a portfolio. Im just wondering though, not everybod likes the Style ive got it (red and black and whatnot) How can i create a link so when clicked it will change the Style Sheet the website is using, so i can include multiple "Skins" thankyou Link to comment Share on other sites More sharing options...
raskren Posted November 15, 2007 Share Posted November 15, 2007 Wrong forum. http://www.alistapart.com/articles/alternate/ This article is six years old but still relevant today. It outlines a JavaScript based approach for switching stylesheets. Those without scripting turned on won't be able to switch styles. Link to comment Share on other sites More sharing options...
King Antonius Posted November 15, 2007 Author Share Posted November 15, 2007 Wrong forum.http://www.alistapart.com/articles/alternate/ This article is six years old but still relevant today. It outlines a JavaScript based approach for switching stylesheets. Those without scripting turned on won't be able to switch styles. Sorry my bad, but thanks for the help :) Link to comment Share on other sites More sharing options...
primexx Posted November 16, 2007 Share Posted November 16, 2007 if you want it to be more functional you could do the style switching server side and then use AJAX to dynamically update the page. that way those with JS disabled will still be able to change stylesheets, but just needs a page refresh. Link to comment Share on other sites More sharing options...
Smitjel Posted November 29, 2007 Share Posted November 29, 2007 This guy does it with jQuery (javascript on steroids). http://www.kelvinluck.com/article/switch-s...ets-with-jquery Check out the demo. http://www.kelvinluck.com/assets/jquery/styleswitch/ Link to comment Share on other sites More sharing options...
Recommended Posts