jQuery Cookie path/subdirectory issue
<p>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.</p>

<p>Basically works as planned on every /path1/SitePages/ wiki page as necessary, however</p>

<p>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.</p>

<p>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..</p>

<pre><code>            $("#s4-leftpanel-content ul.root&gt;li.static&gt;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;
</code></pre>
