added event to control click and touch for collapse