How to get checked nodes in jquery jstree

后端 未结 5 1515
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-19 21:09

I have created one jquery jstree and it\'s working fine. Now the problem is how to get the the checked nodes details.

For Creating JStree The code is:

5条回答
  •  悲&欢浪女
    2020-12-19 22:12

    As the Author of jstree (Ivan Bozhanov) points out on google-Groups Discussion regarding get_checked, it can also be achieved using the following:

    $('#tree').jstree(true).get_selected();
    

    This returns a List of the IDs, e.g. ["j1_2"] or ["j1_2", "j1_3", "j1_1"]

    Check out the fiddle by Ivan Bozhanov himself on: jsfiddle-Example get_selected

提交回复
热议问题