2013-07-11 62 views
0

我想用複選框使用jsTree,但它不起作用。如何使用jsTree設置複選框?

我的代碼:

$("#tree").jstree({ 
    "json_data" : { 
     "data" : data 
    }, 
    checkbox: true, 
    checkboxName: 'checkbox1[]', 
    "plugins" : [ "themes", "json_data", "ui", "checkbox", "types" ] 
}); 

樹看起來不錯,工作,但我沒有複選框選擇項目。

任何人都可以幫忙嗎?

+0

我可能會說一些愚蠢的,因爲我不知道什麼是jstree,但也許你需要在HTML代碼中執行它們? – Ariane

回答

0

這可能對你有幫助。 :)

$("#tree").jstree({ 
"plugins" : ["themes","json_data","ui","checkbox", "types"], 
"json_data":{ 
    data : data 
}, 
"checkbox": { 
    two_state: true 
}});