Hi ,
i took your advice and tried using a cookie. i wrote a short if statement that checks he cookie value and changes the background accordingly. thing is it doesnt change the results. i am not sure what i am doing wrong though
this is my code:
///////////////////////////////////////////
<style type="text/css">
body.gray {
background-color:#0a0a0a;
}
body.white {
background-color:white;
}
</style>
<script type="text/javascript">
jQuery(document).ready(function(){
if( jQuery("body").css("background-color") == "transparent" || jQuery("body").css("background-color") == "white") {
jQuery.cookie("egg", "gray", { expires: 7 });
}
else {
jQuery.cookie("egg", "white", { expires: 7 });
} ;
jQuery("#switch_lnk").click(function(){
if( jQuery.cookie("egg") == "gray" ) {
jQuery('body').toggleClass('gray');
jQuery.cookie("egg", "white", { expires: 7 });
}
else {
jQuery('body').toggleClass('white');
jQuery.cookie("egg", "gray", { expires: 7 });
}
});
});
</script>
///////////////////////////////
any ideas what i might be doing wrong?