I hope someone might be able to help me out. I have an jQuery animated quicklaunch in which I "remember" the open/closed states through use of jQuery cookies. This works well, with the exception of certain instances.
Basically works as planned on every /path1/SitePages/ wiki page as necessary, however
a) when I navigate to a library link in the same site, /path1/Shared Documents/Forms/ or to /path1/Forms/Forms/AllItems.aspx for instance, the cookies for those sub directories kick in which can be in different open/closed states, messing up the user experience.
I just want one set of cookies to determine the open/closed states of my sharepoint site, not competing sub directory cookies.. how is this possible? below is the code I use to apply the cookie..
$("#s4-leftpanel-content ul.root>li.static>a.menu-item").click(function(){
var obj = $(this);
var parObj = obj.parent();
var element = $("ul", parObj);
var show = $(element).is(":visible")?true:false;
if(!show) {
$(element).addClass("selected");
$(element).show('fast');
$(element).prev('a').addClass('active');
$.cookie($(this).text(), 'expanded');
} else {
$(element).removeClass("selected");
$(element).hide('fast');
$(element).prev('a').removeClass('active');
$.cookie($(this).text(), 'collapsed');
}
return false;