title: How to prevent swipe to trigger click?
body: <p>I use <a href="http://labs.rampinteractive.co.uk/touchSwipe/demos/">TouchSwipe</a> to create a swipeable image list. I bind the swipe event to the images, while I also bind a click event that will open up the image's large version.</p>
  
  <p>My problem is that if I swipe, it also fires the click event. I tried <a href="http://labs.rampinteractive.co.uk/touchSwipe/demos/Tap_vs_swipe.html">tap instead of swipe</a> but I can't make it work. After this I tried <code>event.preventDefault()</code> and <code>event.stopPropagation()</code> that was suggested in a lot of place, but there was no effect. My final solution attempt was to unbind the click event and rebind it after the event, but if I bind the event in the very end of the event function, it fires click again.</p>
  
  <pre><code>$(".js-header-swipe-image").swipe({
      swipe:function(event, direction, distance, duration, fingerCount){
          $("#details").unbind('click');//Temporary unbind, otherwise the swipe's click would trigger the gallery opening.
  
          //Handling swipe direction.
  
          $('#details').on('click', '.js-header-swipe-image', function (){//Rebind the temporary unbinded event.
              console.log('click');
              $('#modal-gallery').modal('show');
          });
      }
  });
  </code></pre>
  
  <p>Is there a way to abort an event itself or call a function after the event finished so I can rebind the click after the swipe finished so it wouldn't trigger the rebinded click? I'm also open to any other solution to the problem.</p>