Thanks Jon. This works perfectly.
On Jul 7, 1:17 pm, Jon Banner <banali...@googlemail.com> wrote: > i had a similar problem this morning. I updated the call to the write cookie > to include a path (i was getting a cookie written for each page in the app) > > line 172 in the uncompressed plugin. > > $.cookie(settings.cookieId, data.join(""), { path: '/' } ); > > Jon > > 2009/7/6 Keith <keithhen...@gmail.com> > > > > > Here is the menu that I'm trying to implement. I'm not sure what I'm > > doing wrong, I've followed all of the demos and still the menu is not > > properly setting the cookie, which is causing the menu to open > > incorrectly when the page loads. > > > Please let me know if there is something wrong in my code or if anyone > > has a suggestion that I can try out that would be great. Thanks for > > your help. > > > <head> > > <link rel="stylesheet" href="/mars/css/jquery.treeview.css" /> > > <link rel="stylesheet" href="/mars/css/screen.css" /> > > <script src="/mars/js/lib/jquery.js" > > type="text/javascript"></script> > > <script src="/mars/js/lib/jquery.cookie.js" > > type="text/javascript"></ > > script> > > <script src="/mars/js/jquery.treeview.js" type="text/javascript"></ > > script> > > <script type="text/javascript"> > > jQuery.noConflict(); > > // fourth example > > jQuery(document).ready(function(){ > > > // fourth example > > jQuery("#black, #gray").treeview({ > > control: "#treecontrol", > > persist: "cookie", > > cookieId: "treeview-black" > > }); > > }); > > </script> > > </head> > > <body> > > <div id="main"> > > <div id="treecontrol"> > > <a title="Collapse the entire tree below" href="#"><img > > src="/mars/ > > img/nav/minus.gif" /> Collapse All</a> > > <a title="Expand the entire tree below" href="#"><img > > src="/mars/img/ > > nav/plus.gif" /> Expand All</a> > > <a title="Toggle the tree below, opening closed branches, > > closing > > open branches" href="#">Toggle All</a> > > </div> > > <ul id="black" class="treeview-black"> > > <li> > > <span>Customer Selection</span> > > <ul> > > <li> > > <a > > href="/mars/jsp/viewflightcalcrit.jsp" >Flight Search</a> > > </li> > > <li> > > <a > > href="/mars/index.jsp?viewdash=1">Dashboard</a> > > </li> > > </ul> > > </li> > > </ul> > > <ul id="gray" class="treeview-gray"> > > <li> > > <span>Contrax</span> > > <ul> > > <li> > > <a > > href="/mars/contrax/contractselection.jsp? > > isRenewal=1">Contracts (Renewals)</a> > > </li> > > <li> > > <a > > href="/mars/contrax/systemselect.jsp">New Contract/Estimate</ > > a> > > </li> > > </ul> > > </li> > > </ul> > > > </div> > > </body> > > > Keith