implement touch swipe function in pc and mobile