my question might be simple, but i just dont get managed how to do this. i want to save 'bgid' throughout several browsing session and page reloads. i thought about using cookies, but i do not know how to imply them. here is my code (btw, i am using jQuery):
<script>
var bgid = 2;
var bgnumber = 3;
$('#changebg').click(function() {
$('body').removeClass();
$('body').addClass('class' + bgid);
if(bgid < bgnumber + 1) {
bgid = bgid + 1;
} else {
bgid = 2;
}
});
</script>;
could you guys help me? thanks! :)