Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ファンシーツリー プラグインを使用してディレクトリをレンダリングしています。このファンシーツリーの横にボタンがあります。ユーザーはこのボタンをクリックし、選択したノードのリストをツリーから取得し、それを使って何かを行う必要があります。
button.click イベントでツリーから選択したノードのリストにアクセスするにはどうすればよいですか?
$('#button').click(function() { // how to get selected nodes in tree });
$('#button').click(function() { //first method - get previous element relative to the button $(this).prev().fancytree("getSelectedNodes"); //second method - use array $("#tree").fancytree("getSelectedNodes"); });