jstree will not fire onchange event
- by vasion
i have been really stuck on this. this is the code:
js:
var treeoptions={"data":{"type":"json","opts":{"url":"\/surveytags\/treejson"}}};
$('#treecontainer').tree(treeoptions);
$("#treecontainer").tree({
callback : {
ondblclk : function (node, tree) {
alert(node.id);
},
onmove : function (node,ref,type){
data= new Object();
data.node= new Object();
data.node.id = node.id;
data.ref=new Object();
data.ref.id = ref.id;
data.type = type;
moveitem(data);
},
onchange : function (){
alert('focused');
},
oncreate : function(node){
alert('create');
alert(node.data);
}
}
});
this is the json:
{"attributes":{"id":"1"},"data":{"title":"root"},"children":[{"attributes":{"id":"2"},"data":{"title":"blah"},"children":[{"attributes":{"id":"3"},"data":{"title":"tworows down"}},{"attributes":{"id":"4"},"data":{"title":"tooope"}}]}]}
it loads. other events fire. BUT onchange will not...