I am trying to get click event in li using jstree please see the code
$('#uu').click(function () {
var ref = $('#tree').jstree(true),
sel = ref.get_selected();
if (!sel.length) {
alert('thank')
sel = ref.create_node("#", {"id" : node_count+1, "text" : node_count+1});
node_count++;
} else
{
sel = sel[0];
sel = ref.create_node(sel, {"id" : node_count+1, "text" : node_count+1});
node_count++;
}
/*if (sel) {
ref.edit(sel);
}*/
ref.deselect_all();
});
Here in alert id of click event is not coming please help me out on this.