Is it possible to go back a page /forward a page depending on which side of the screen the user clicks on?

How can I implement snapchat like features on a page that display videos/images to goto the prev/next one depending on if they click on the left side of the screen or the right? Just to be clear all the images/videos will shown on the same page, I just want to skip to the previous one or the next one depending on where they click


Check the output from the $event variable passed to the (click) method (if defined as such).

It may contain coordinates and then you can determine based on viewport size