Hi,
It's my first time dealing with cookies in JavaScript and the below script works fine on my local PC but when I upload it here: example it fails.
$(document).ready(function(){
// Get Cookie
var getCookie = document.cookie;
if(getCookie == "stylesheet=blue")
{
$("[rel=stylesheet]").attr({href : "blue.css"});
}
else if(getCookie == "stylesheet=main")
{
$("[rel=stylesheet]").attr({href : "main.css"});
}
// Set Stylsheet back to Main
$('#reset').click(function()
{
$("[rel=stylesheet]").attr({href : "main.css"});
var setCookie = document.cookie = "stylesheet=main";
});
// Set Stylsheet Blue
$('#blue').click(function()
{
$("[rel=stylesheet]").attr({href : "blue.css"});
var setCookie = document.cookie = "stylesheet=blue";
});
});
Any ideas?