using multiple toggle boxes with jQuery cookie
I want to use the jquery cookie to remember if one of the boxes was down or up. I can only store 2 values i a cookie. Any one a simple trick for this?
This the part that i now have:
-
/* toggle selected box */
$(".content-header-right").click(function(){
$(this).parents(".content-header").next(".content-in").slideToggle("slow");
// get the id of the box
var id = $(this).parents(".content-header").next(".content-in").attr('id');
if ($(this).find('a.toggle-close-btn').is(":hidden")){
$(this).find('a.toggle-close-btn').show();
$(this).find('a.toggle-open-btn').hide();
$.cookie(id, 'show');
} else {
$(this).find('a.toggle-open-btn').show();
$(this).find('a.toggle-close-btn').hide();
$.cookie(id, 'hide');
}
});