adds click function for mobile