Hooked up the event for touch devices.