How to get a list of verified identifiers from jstree with the checkbox plugin?

How to get a list of verified identifiers from jstree with a checkbox plugin?

+3
source share
3 answers
var result = new Array();
$(".jstree-checked").each(function(i, element){
    result[i] = $(element).attr("id");
}); 
0
source
var arr = new Array();
var i = 0;
$('#dtree_region li').filter('.jstree-checked').each(function(){
                     arr[i] = $.makeArray($(this).attr("id"));
                    //  sel_id = sel_id + ',' + $(this).attr("id");
                        i++;
                        });
var sel_id = arr.join(",");
0
source

http://www.jstree.com/documentation/checkbox

.get_checked ( context, get_all ), .get_unchecked ( context, get_all )

(at the bottom of this page)

-1
source

Source: https://habr.com/ru/post/1745093/


All Articles