Swipe Event

Swipe Event

I've searched the forums and some slightly describe what the JS should look like, but none show the whole implementation. I'm a complete noob to js and was hoping to get some help. All I want to do is implement the swipe left and right feature to move the page forward or backward. I have no idea how to do it.

What does the JS look like? What should the html look like? Nothing fancy just loading whole new pages, that's all. Later down the road when I become educated, I'm sure there's probably a way to pre-load the next page and to have the previous page stay cached. Any help would be much appreciated.

-Drew