adding sliding and clicking events for mobile and desktop