refactor(collapse): use DOM callbacks