title: Hammer.js - carousel next and previous button
body: <p>I'm creating something similar to the hammer.js carousel. I'd like to add next and previous buttons to the carousel. I found this solution on StackOverflow: <a href="https://stackoverflow.com/questions/15582578/triggering-hammer-js-drag-slide-behavior-on-mouse-click">Triggering Hammer.js drag/slide behavior on mouse click</a>.</p>
  
  <p>Using the code from the above link I was able to get the next button working, but the previous button with the same code doesn't work.</p>
  
  <p>Code for the next button:</p>
  
  <pre><code>var nexthammertime = Hammer('.next').on("tap", function (event) {
        console.log(event);
        var nextCarousel = new Carousel("#carousel");
        nextCarousel.init();
        nextCarousel.showPane(1);
    });
  </code></pre>
  
  <p>Code for the previous button:</p>
  
  <pre><code>var previoushammertime = Hammer('.previous').on("tap", function (event) {
        console.log(event);
        var previousCarousel= new Carousel("#carousel");
        previousCarousel.init();
        previousCarousel.showPane(0);
    });
  </code></pre>