java吧 关注:1,297,285贴子:12,832,143
  • 0回复贴,共1

jstree data获取不到数据!

取消只看楼主收藏回复

function jstreefun (pn) {
$("#browser").jstree({
"plugins" : [ "themes", "json_data", "checkbox" ],
"themes" : {"themes" : "default-rtl", "dots" : true , "icons" : true},
"json_data" : {
"ajax" : {
"url" : pn,
"data" : function (n) {
return { parentId : n.attr ? n.attr("id") : ""};
}
}
}
}).bind("click.jstree", function(e, data) {
alert(); //这里的 data为undefined!
})
}


1楼2012-07-30 18:43回复