I'm using the jsTree jQuery plugin with the checkbox theme. Does anyone know how to get the selected values with a form post?
Thank you!
In the last version (3.0), the API was changed.
If you need just array of selected IDs (like in examples in this node), it is now very easy:
var selectedElmsIds = $('#tree').jstree("get_selected");
If you need to iterate over the selected elements, you just need to pass additional "true" parameter.
var selectedElmsIds = [];
var selectedElms = $('#tree').jstree("get_selected", true);
$.each(selectedElms, function() {
selectedElmsIds.push(this.id);
});