this is in the JS file /** * Abstract method that is executed when a node is collapsed. * @method onCollapse * @param node {Node} the node that was collapsed. * @deprecated use treeobj.subscribe("collapse") instead */ onCollapse: function(node) { } }; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tree.subscribe("collapse", function(node) { //alert(node.index + " was collapsed"); return false; }); *************need to put that code up in to that file above******************