2012-01-10 38 views
0

jsTreeの別の "search_method"を使用する必要があります。少なくとも3つの機能があります:私は "jstree_title_contains" に変更する必要があり、最初のボタンのsearch_methodをクリックすると1つのアプリケーションでjsTreeに異なる「search_method」を使用するにはどうすればよいですか?

  • "jstree_title_contains"
  • "jstree_contains" 例えば

"が含まれています" 。 2番目のボタンをクリックすると、search_methodが "jstree_contains"に変更されます。

どうすればいいですか? 。

このような何かが動作するはず

答えて

3

:私はIDを持っている場合

jstree = $.jstree._reference(root_element); // root_element is the selector for the element jstree is attached to (element.jstree({...})) 
jstree._get_settings().search.search_method = 'jstree_title_contains'; // or 'contains' or 'jstree_contains' 
+0

そう= "木" 私はちょうど$( '#ツリー')._ get_settings()search.search_method = 'jstree_title_contains' を試すことができます。私は正しい? –

+0

まず参照を取得する必要があります。上記のように試しましたか? – glortho

+0

ありがとうございます。できます! –

関連する問題