jquery/jstree show child nodes initially -
i'm using jstree jquery plugin display , manage tree. json data:
0: {id:35, name:amrs trade, parent_id:null} 1: {id:36, name:trips, parent_id:35} 2: {id:37, name:tribute, parent_id:null} 3: {id:38, name:music, parent_id:null} 4: {id:39, name:recordings, parent_id:38} 5: {id:40, name:live shows, parent_id:38} 6: {id:41, name:others, parent_id:null} 7: {id:42, name:investments, parent_id:null} 8: {id:43, name:gold & silver, parent_id:42} 9: {id:44, name:debentures, parent_id:42} 10: {id:46, name:production, parent_id:35} 11: {id:54, name:real estate, parent_id:42} that i'm using create render tree:
$("#incomecategorytree").jstree({ "json_data" : { "data" : income, "progressive_render" : true }, "plugins" : [ "themes", "json_data" ] }) i want display tree , have chosen nodes opened (at now, top levels displayed , non-top-level nodes hidden). option can add above json make jstree expand chosen nodes initially?
state:open/closed job:
0: {id:35, name:amrs trade, parent_id:null, state:open} 1: {id:36, name:trips, parent_id:35} 2: {id:37, name:tribute, parent_id:null} 3: {id:38, name:music, parent_id:null} 4: {id:39, name:recordings, parent_id:38} 5: {id:40, name:live shows, parent_id:38} 6: {id:41, name:others, parent_id:null} 7: {id:42, name:investments, parent_id:null, state:closed} 8: {id:43, name:gold & silver, parent_id:42} 9: {id:44, name:debentures, parent_id:42} 10: {id:46, name:production, parent_id:35} 11: {id:54, name:real estate, parent_id:42}
Comments
Post a Comment