I'm using [TouchSwipe](http://labs.rampinteractive.co.uk/touchSwipe/demos/) for an html/javascript hybird android app. Basically I want to enable touch/swipe so a user can swipe left/right to go to next/previous page

```
<div id="test" class="box">Index</div>
    <script>
        $(function() {          
            //Enable swiping...
            $("#test").swipe( {
                swipe:function(event, direction) {
                    //direction returns four events: left, right, up & down
                    //depending on which direction you swiped on the page
                },
              //Default is 75px, set to 0 for demo so any distance triggers swipe
               threshold:75
            });
        });
    </script>

```

My question is how to make use of those returned events?

For example if the event is "left" I want to

```
window.location.href = "about.html";

```

Else if the event is "right" I want to

```
window.location.href = "home.html";

```

**UPDATE:** Figured it out, the answer was plain simple. I made myself too complicated

```
if(direction=='left'){
        window.location.href = "GuidedTour.xhtml";
      }else if(direction=='right'){
        window.location.href = "../index.html";
      }

```