JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<script src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<input id="ct" class="easyui-combotree" style="width:200px;">

<a href="#" onclick="test()">GetLevel</a>
<script>
    function test(){
        var t = $('#ct').combotree('tree');
        var node = t.tree('getSelected');
        if (node){
            var level = t.tree('getLevel',node.target);
            alert(level);
        }
    }
</script>

JavaScript

$.extend($.fn.tree.methods,{
    getLevel: function(jq, target){
        return $(target).find('span.tree-indent,span.tree-hit').length;
    }
});

$('#ct').combotree('loadData', [{
    id: 1,
    text: 'Languages',
    children: [{
        id: 11,
        text: 'Java'
    },{
        id: 12,
        text: 'C++'
    }]
}]);