2010-03-09 90 views

回答

0

嗯,我认为它可能是

$.cookie('key', 'value', { path : "/" }); 

应该很容易去,:)

1

我只是重置的cookie。它不需要任何补丁的树状插件

$("#tree").treeview({ 
     persist: "cookie", 
     toggle: function (args) { 
      // get cookie 
      cookieId = "MycookieId"; 
      data = $.cookie(cookieId); 
      // remove cookie 
      $.cookie(cookieId, null); 
      // add with path 
      $.cookie(cookieId, data, { path: "/" }); 
     } 
    }); 
-1

只要使用此:

$(document).ready(function(){ 
    $("#red").treeview({ 
     animated: "fast", 
     collapsed: true, 
     unique: true, 
     persist: "cookie", 

    }); 
}); 

应该罚款。

和这个:jquery.cookie.js