I need help to add cookie here, im try but can’t , don’t know how to add… any help ?
$(document).ready(function(){
$("li.black_c").click( function(){ $
(".main").removeClass('bg2 , bg3').addClass("bg1");
});
$("li.blue_c").click( function(){ $
(".main").removeClass("bg1 , bg3").addClass("bg2");
});
$("li.red_c").click( function(){ $
(".main").removeClass("bg1 , bg2").addClass("bg3");
});
});
Here is working demo http://jsfiddle.net/jhMfw/ but without cookie
For a very simple usage, I recommend you the jQuery cookie plugin and the tutorial here to learn how to use it.
Demonstration : http://jsfiddle.net/jhMfw/2/