0

I have implemented a styleswitcher. but it only works on firefox. I want to run this also on chrome, IE etc.

styleswitcher.js

http://designshack.net/tutorialexamples/styleswitcher/styleswitcher.js

head

<script type="text/javascript" src="./js/styleswitcher.js"></script>
    <link rel="stylesheet" type="text/css" href="./css/main.css" title="default">
    <link rel="alternate stylesheet" type="text/css" href="./css/style1.css" title="darkblue"> 

body

<a href="/" onclick="setActiveStyleSheet('darkblue'); return false;">darkblue</a>
<a href="/" onclick="setActiveStyleSheet('default'); return false;">Default</a>

I think, I can't save the cookie on chrome, but I don't know why.

Alex Kulinkovich
  • 4,408
  • 15
  • 46
  • 50
tamaramaria
  • 173
  • 1
  • 4
  • 17

0 Answers0