Put collapse on correct DOM element