New to jQuery: How to set cookies for stylesheetswitcher?
Hello, I'm new here and I'm learning jQuery :)
Code of the switcher:
- google.load("jquery", "1.3.1");
- google.setOnLoadCallback(function()
- {
-
- // Color changer
- $(".colorblack").click(function(){
- $("link").attr("href", "app/tpl/skins/DarkFlat/style/black.css");
- return false;
- });
-
- $(".colorblue").click(function(){
- $("link").attr("href", "app/tpl/skins/DarkFlat/style/blue.css");
- return false;
- });
-
- $(".colorgreen").click(function(){
- $("link").attr("href", "app/tpl/skins/DarkFlat/style/green.css");
- return false;
- });
-
- $(".colororange").click(function(){
- $("link").attr("href", "app/tpl/skins/DarkFlat/style/orange.css");
- return false;
- });
-
- });
And every time a user chooses another "theme" it should safe it.