Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node id of jstree checkbox

I need to retrieve the id of the node when unchecked. On form submit the below code returns all the id of the selected node

checkbox: {
                real_checkboxes: true,
                two_state: true,
                real_checkboxes_names: function (n) {
                    return [("check_" + (n[0].id)), n[0].id]
                }
            }

But for my need i need the id when the node is unchecked like

}).bind('uncheck_node.jstree',function(e,data){
            {     
                var a=$(e).attr('id');               
                alert(a);
            }
        });
like image 798
Bijay Thapa Avatar asked Dec 29 '25 04:12

Bijay Thapa


1 Answers

.bind("change_state.jstree", function (e, data) {
    if (data.args[1] == true) {
        var a = $(data.rslt).attr('id');
        alert(a);
    }
})
like image 149
Kir Avatar answered Dec 30 '25 19:12

Kir



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!