here is my code:
$(document).ready(function() {
$("#root ul").each(function() {$(this).css("display", "none");});
$("#root .category").click(function() {
var childid = "#" + $(this).attr("childid");
if ($(childid).css("display") == "none") {
$(childid).css("display", "block");
}
else {
$(childid).css("display", "none");
}
if ($(this).hasClass("cat_close")) {
$(this).removeClass("cat_close").addClass("cat_open");}
else {
$(this).removeClass("cat_open").addClass("cat_close");
}
});
});
Can you help me out in creating/setting a cookie that will remember the menu box that was opened after leaving the page or clicking a link? BTW, I would like to use Jquery cookie plugin.
Thank you!!
Use jquery-cookie plugin
Your code will looks like (if I correctly understand what is here):