persist: "cookie"貌似不管用了,请教下怎么处理?

解决方案 »

  1.   

    页面有引入 cookie plugin 吗
      

  2.   

    有个jquery.cookie.js文件得引  才能设置cookie保存树状态
      

  3.   

    引入了
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>jQuery async treeview</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" href="../jquery.treeview.css" />
    <link rel="stylesheet" href="screen.css" />
    <script src="../jquery-1.6.1.min.js" type="text/javascript"></script>
    <script src="../lib/jquery.cookie.js" type="text/javascript"></script>
    <script src="../jquery.treeview.js" type="text/javascript"></script>
    <script src="../jquery.treeview.edit.js" type="text/javascript"></script>
    <script src="../jquery.treeview.async.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function(){
    var pos="";
    $("#docClass").treeview({
    url: "docclass.php",
    unique:true,
    animated: "fast",
    persist: "cookie"//,
    //prerendered:true
    });
    });
    </script>
    </head>
    <body>
    <ul id="docClass" class="treeview-red"></ul>
    </body>
    </html>
      

  4.   

    自己通过cookie解决了,谢谢参与回复的两位朋友。