click handler for navigating trees from treemachine