Support dynamically added trees

Replace `.click` with `.delegate` to support for dynamically added trees. Tested and working on local.