Adds collapsible behavior to a target element